View Single Post
  #8 (permalink)  
Old 09-11-2006, 19:26
Cruisecar Cruisecar is offline
Junior Member
 
Join Date: Nov 2006
Posts: 13
Default Fix

You must be very carefull if you use register_globals, example:-

if($adminpassword == $upassword){

$admin = "1";

}

if($admin == "1"){
//Display secure information
}

As you can imagine, if the users puts index.php?admin=1 - your website hosting is instantly vulnerable. You must make sure to define all variables at the top of your script (that aren't from a form). A fix for the above script would be just to add $admin = "0"; at the top.

Last edited by Cruisecar; 09-11-2006 at 19:31.
Reply With Quote