More robust test against sql injections

This commit is contained in:
Laurent Destailleur 2019-05-21 17:41:41 +02:00
parent 22e897b1a1
commit bfa4483722

View File

@ -91,7 +91,7 @@ function testSqlAndScriptInject($val, $type)
} }
if ($type == 3) if ($type == 3)
{ {
$inj += preg_match('/select|update|delete|replace|group\s+by|concat|count|from/i', $val); $inj += preg_match('/select|update|delete|truncate|replace|group\s+by|concat|count|from|union/i', $val);
} }
if ($type != 2) // Not common key strings, so we can check them both on GET and POST if ($type != 2) // Not common key strings, so we can check them both on GET and POST
{ {