Possible Authenticate User Issue in DB v1.1.2
Hi,
After upgrading to the current version, I noticed some code changes from a previous Authenticate User Server Behavior release when updating DataBridge's Security Assist Authenticate User Server Behavior.
The result is that users are no longer able to login using their existing and previously working credentials. On completion and submission it appears not to post the data as neither the redirect or success page are shown.
Earlier working code;
if($_SERVER["REQUEST_METHOD"] == "POST"){
$WA_Auth_Parameter = array(
"connection" => $...Connect,
"database" => $database_...Connect,
"tableName" => "...",
"columns" => explode($WA_Auth_Separator,"...Id".$WA_Auth_Separator."Pswd".$WA_Auth_Separator."AdminOvr".$WA_Auth_Separator."VerifiedFlag"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["user"]))?$_POST["user"]:"") ."".$WA_Auth_Separator."".((isset($_POST["password"]))?$_POST
["userpassword"]:"") ."".$WA_Auth_Separator."0".$WA_Auth_Separator."1"),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text".$WA_Auth_Separator."int".$WA_Auth_Separator."int"),
"sessionColumns" => explode($WA_Auth_Separator,"hoidx".$WA_Auth_Separator."hofName".$WA_Auth_Separator."holName".$WA_Auth_Separator."hoUserId".
$WA_Auth_Separator."hoType".$WA_Auth_Separator."hoPublish".$WA_Auth_Separator."hoAdminOvr".$WA_Auth_Separator."hoVerifiedFlag"),
"sessionNames" => explode($WA_Auth_Separator,"hoidx".$WA_Auth_Separator."hofName".$WA_Auth_Separator."holName".$WA_Auth_Separator."hoUserId".
$WA_Auth_Separator."Type".$WA_Auth_Separator."Publish".$WA_Auth_Separator."AdminOvr".$WA_Auth_Separator."VerifiedFlag"),
"successRedirect" => "members/index.php",
"failRedirect" => "problems.php",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
);
WA_AuthenticateUser($WA_Auth_Parameter);
}
v1.1.2 code
if(($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER
["PHP_SELF"])) > 0) && isset($_POST)){
$WA_Auth_Parameter = array(
"connection" => $...Connect,
"database" => $database_...Connect,
"tableName" => "...",
"columns" => explode($WA_Auth_Separator,"Id".$WA_Auth_Separator."Pswd".$WA_Auth_Separator."VerifiedFlag".$WA_Auth_Separator."AcctStatus"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["user"]))?$_POST["user"]:"") ."".$WA_Auth_Separator."".((isset($_POST["password"]))?$_POST
["userpassword"]:"") ."".$WA_Auth_Separator."1".$WA_Auth_Separator."0"),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text".$WA_Auth_Separator."int".$WA_Auth_Separator."int"),
"sessionColumns" => explode($WA_Auth_Separator,"idx".$WA_Auth_Separator."hofName".$WA_Auth_Separator."holName".$WA_Auth_Separator."Id".
$WA_Auth_Separator."ActiveDate".$WA_Auth_Separator."Type".$WA_Auth_Separator."Salute"),
"sessionNames" => explode($WA_Auth_Separator,"idx".$WA_Auth_Separator."hofName".$WA_Auth_Separator."holName".$WA_Auth_Separator."Id".
$WA_Auth_Separator."ActiveDate".$WA_Auth_Separator."Type".$WA_Auth_Separator."Salute"),
"successRedirect" => "",
"failRedirect" => "",
"gotoPreviousURL" => FALSE,
"keepQueryString" => TRUE
);
WA_AuthenticateUser($WA_Auth_Parameter);
Nothing else in the page has changed, apart from the code change as per above.
Any ideas please?