From: Robert Fitzsimons Date: Sat, 23 Dec 2006 03:35:15 +0000 (+0000) Subject: gitweb: Require a minimum of two character for the search text. X-Git-Tag: v1.5.0-rc0~21 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9d032c725034e7c072f8c1a3e11855594c2fc0af;p=git.git gitweb: Require a minimum of two character for the search text. Signed-off-by: Robert Fitzsimons Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index c1e8bbc3c..9061c4a75 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; }