close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

GET and Server Validation

Thread began 3/26/2013 4:33 pm by Cologne | Last modified 3/27/2013 10:10 am by Jason Byrnes | 1185 views | 3 replies |

Cologne

GET and Server Validation

Hello,

I got 2 server validations on my page. 1 before page loads to check the $_GET and the 1 to check the from.
But the $_GET check directly goes to the restricted page :-(

<?php 
if ("" == "") {
$WAFV_Redirect = "restricted.php";
$_SESSION['WAVT_login_375_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateLE($_GET['login'] . "",false . "",false,6);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"login_375");
}
}
?>
<?php
if (isset($_POST["buttonLogin"]) || isset($_POST["buttonLogin_x"])) {
$WAFV_Redirect = "login.php";
$_SESSION['WAVT_login_093_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRX(((isset($_POST["title"]))?$_POST["title"]:"") . "","/^$/i",false,1);
$WAFV_Errors .= WAValidateEM(((isset($_POST["username"]))?$_POST["username"]:"") . "",true,2);
$WAFV_Errors .= WAValidateAN(((isset($_POST["password"]))?$_POST["password"]:"") . "",true,true,true,false,"üöäßÜÖÄ_-$§&#*€@",true,3);
$WAFV_Errors .= WAValidateEL(((isset($_POST["password"]))?$_POST["password"]:"") . "",6,50,true,4);
$WAFV_Errors .= WAValidateRX(((isset($_POST["product"]))?$_POST["product"]:"") . "","/^$/i",false,5);

if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"login_093");
}
}
?>
<?php
if(isset($_POST["buttonLogin"]) || isset($_POST["buttonLogin_x"])){
$WA_Auth_Parameter = array(
"connection" => $Localhero,
"database" => $database_Localhero,
"tableName" => "members",
"columns" => explode($WA_Auth_Separator,"username".$WA_Auth_Separator."password".$WA_Auth_Separator."flag"),
"columnValues" => explode($WA_Auth_Separator,"".strtoupper(((isset($_POST["username"]))?$_POST["username"]:"")) ."".$WA_Auth_Separator."".WA_CryptEncryption(((isset($_POST["password"]))?$_POST["password"]:"")) ."".$WA_Auth_Separator."1"),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text".$WA_Auth_Separator."int"),
"sessionColumns" => explode($WA_Auth_Separator,"id".$WA_Auth_Separator."flag"),
"sessionNames" => explode($WA_Auth_Separator,"memberID".$WA_Auth_Separator."memberLevel"),
"successRedirect" => "members/diver.php",
"failRedirect" => "login.php?login=false",
"gotoPreviousURL" => FALSE,
"keepQueryString" => FALSE
);

WA_AuthenticateUser($WA_Auth_Parameter);
}
?>



I check entry is like = false

But this seems not to work.

Any help/suggestions?

Denis

Sign in to reply to this post

Jason ByrnesWebAssist

the like entry validation is intended to comp[are 2 variables, not a variable to a string.

change the code:

php:
$WAFV_Errors .= WAValidateLE($_GET['login'] . "",false . "",false,6);



to:

php:
$WAFV_Errors .= WAValidateLE($_GET['login'] . "", "false",false,6);




so that false is treated as a string.

Sign in to reply to this post

Cologne

hmm, I did, but now the page login.php directly moves to the restricted page.

Sign in to reply to this post

Jason ByrnesWebAssist

yes, thats because the validation is checking to make sure that the login querystring is equal to false. you have to include the login=false querystring:

login.php?login=false

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...