@matheusbsbs / matheus-bagliano / commits / 9d032c7250
Fork 0

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>

Robert Fitzsimons committed Dec 23, 2006 at 03:35 UTC 9d032c725034e7c072f8c1a3e11855594c2fc0af
1 file changed +3
gitweb/gitweb.perl
+3
@@ -351,6 +351,9 @@ if (defined $searchtext) {
351 if ($searchtext =~ m/[^a-zA-Z0-9_\.\/\-\+\:\@ ]/) {
352 die_error(undef, "Invalid search parameter");
353 }
354 + if (length($searchtext) < 2) {
355 + die_error(undef, "At least two characters are required for search parameter");
356 + }
357 $searchtext = quotemeta $searchtext;
358 }
359