diff options
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.perl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index c1e8bbc3cb..9061c4a75e 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -351,6 +351,9 @@ if (defined $searchtext) { if ($searchtext =~ m/[^a-zA-Z0-9_\.\/\-\+\:\@ ]/) { die_error(undef, "Invalid search parameter"); } + if (length($searchtext) < 2) { + die_error(undef, "At least two characters are required for search parameter"); + } $searchtext = quotemeta $searchtext; } |