Undefined index QUERY_STRING... kind of lost...
Posted: Sun Mar 26, 2006 8:08 pm
Hi:
Following some advice in here, I enabled error_reporting = E_ALL in my server. I found some notices about variables and fixed them. I dont know how to fix this one though:
Notice: Undefined index: QUERY_STRING in /var/www/web25/web/catalog/class.php on line 12
This is the script:
What is wrong ? Why doesn't recognize de QUERY_STRING?
Following some advice in here, I enabled error_reporting = E_ALL in my server. I found some notices about variables and fixed them. I dont know how to fix this one though:
Notice: Undefined index: QUERY_STRING in /var/www/web25/web/catalog/class.php on line 12
This is the script:
Code: Select all
$threats = array(";", "'", "AS ", "/**/", "/SELECT/","/UNION/" );
if (strpos($_SERVER['PHP_SELF'], "trackback") === false) {
foreach($threats as $threat) {
if(stristr($_SERVER['QUERY_STRING'], $threat)) {
die("Hack!");
}
}
}