aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Fitzsimons <robfitz@273k.net>2006-12-23 03:35:15 +0000
committerJunio C Hamano <junkio@cox.net>2006-12-22 23:18:41 -0800
commit9d032c725034e7c072f8c1a3e11855594c2fc0af (patch)
tree7bcf0d0a29f9fef7fd9132a8bdd7f42ab79159c9
parent8e574fb542eaf7f41d5416b2cf65b5c2e93829d6 (diff)
downloadgit-9d032c725034e7c072f8c1a3e11855594c2fc0af.tar.gz
git-9d032c725034e7c072f8c1a3e11855594c2fc0af.tar.xz
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>
-rwxr-xr-xgitweb/gitweb.perl3
1 files changed, 3 insertions, 0 deletions
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;
}