Modified match for forbidden words. Now not allows spaces or scaped chars. Other cases must not be problemathic
This commit is contained in:
parent
c8d8b1a312
commit
c6b1e92bda
|
@ -2136,7 +2136,7 @@ function check_sql($sql)
|
|||
{
|
||||
// We remove "*" to avoid things like SELECT * FROM tusuario
|
||||
// Check that it not delete_ as "delete_pending" (this is a common field in pandora tables).
|
||||
if (preg_match('/\*|delete[^_]|drop|alter|modify|password|pass|insert|update/i', $sql)) {
|
||||
if (preg_match('/([ ]*(delete|drop|alter|modify|password|pass|insert|update)\b[ \\]+)/i', $sql)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue