Update: It appears the answer is:if ( $_ =~ /$(--|;|DELETE\s|DROP\s|UPDATE\s|EXEC\s|INSERT\s|CREATE\s|d +elete\s|drop\s|update\s|exec\s|insert\s|create\s)/ ) { print "There is a possible injection attack here"; ## Security fun +ction here die; }
But how do I stop the case insensitivity applying to '--' and ';'?if ( $_ =~ /$(--|;|DELETE\s|DROP\s|UPDATE\s|EXEC\s|INSERT\s|CREATE\s +)/i ) { die; }
In reply to Making a regex case insensitive by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |