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>
This commit is contained in:
Robert Fitzsimons 2006-12-23 03:35:15 +00:00 committed by Junio C Hamano
parent 8e574fb542
commit 9d032c7250

View file

@ -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;
}