Skip to content

Commit

Permalink
gitweb: Require a minimum of two character for the search text.
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Robert Fitzsimons authored and Junio C Hamano committed Dec 23, 2006
1 parent 8e574fb commit 9d032c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ sub check_export_ok {
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;
}

Expand Down

0 comments on commit 9d032c7

Please sign in to comment.