Skip to content

Commit

Permalink
Catch more SQL injection attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Feb 10, 2024
1 parent 2d30012 commit a24576d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/CGI/Info.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ sub is_robot {
return 0;
}

if(($agent =~ /SELECT.+AND.+/) || ($agent =~ /ORDER BY /) || ($agent =~ / OR NOT /) || ($agent =~ / AND \d+=\d+/) || ($agent =~ /THEN.+ELSE.+END/) || ($agent =~ /.+AND.+SELECT.+/)) {
if(($agent =~ /SELECT.+AND.+/) || ($agent =~ /ORDER BY /) || ($agent =~ / OR NOT /) || ($agent =~ / AND \d+=\d+/) || ($agent =~ /THEN.+ELSE.+END/) || ($agent =~ /.+AND.+SELECT.+/) || ($agent =~ /\sAND\s.+\sAND\s/)) {
$self->status(403);
$self->{is_robot} = 1;
if($self->{logger}) {
Expand Down

0 comments on commit a24576d

Please sign in to comment.