mirror of
https://github.com/git/git
synced 2024-09-13 21:34:42 +00:00
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:
parent
8e574fb542
commit
9d032c7250
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue