Browse Source

gitweb: Require a minimum of two character for the search text.

Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Robert Fitzsimons 18 years ago committed by Junio C Hamano
parent
commit
9d032c7250
  1. 3
      gitweb/gitweb.perl

3
gitweb/gitweb.perl

@ -351,6 +351,9 @@ if (defined $searchtext) { @@ -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;
}


Loading…
Cancel
Save