This commit is contained in:
Laurent Destailleur
2011-09-12 18:15:11 +00:00
parent bf1a49c75d
commit 2a672b3d02
5 changed files with 96 additions and 77 deletions

View File

@@ -67,6 +67,7 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* removed in PHP6
*
* @param string $val Value
* @param string $get 1=GET, 0=POST
* @return boolean true if ther is an injection
*/
function test_sql_and_script_inject($val, $get)
{
@@ -91,6 +92,7 @@ function test_sql_and_script_inject($val, $get)
*
* @param string $var Variable name
* @param string $get 1=GET, 0=POST
* @return boolean true if ther is an injection
*/
function analyse_sql_and_script(&$var, $get)
{
@@ -115,6 +117,7 @@ function analyse_sql_and_script(&$var, $get)
return (test_sql_and_script_inject($var,$get) <= 0);
}
}
// Sanity check on URL
if (! empty($_SERVER["PHP_SELF"]))
{