Merge branch '3.4' of git@github.com:Dolibarr/dolibarr.git into 3.4

This commit is contained in:
Laurent Destailleur 2013-10-19 14:59:46 +02:00
commit 24cd2d2b85

View File

@ -102,7 +102,7 @@ function test_sql_and_script_inject($val, $type)
}
// For XSS Injection done by adding javascript closing html tags like with onmousemove, etc... (closing a src or href tag with not cleaned param)
if ($type == 1) $sql_inj += preg_match('/"/i', $val); // We refused " in GET parameters value
if ($type == 2) $sql_inj += preg_match('/[\s;"]/', $val); // PHP_SELF is an url and must match url syntax
if ($type == 2) $sql_inj += preg_match('/[;"]/', $val); // PHP_SELF is a file system path. It can contains spaces.
return $sql_inj;
}