summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLibravatar Robert Fitzsimons <robfitz@273k.net>2006-12-23 03:35:15 +0000
committerLibravatar Junio C Hamano <junkio@cox.net>2006-12-22 23:18:41 -0800
commit9d032c725034e7c072f8c1a3e11855594c2fc0af (patch)
tree7bcf0d0a29f9fef7fd9132a8bdd7f42ab79159c9 /gitweb
parentgitweb: Use rev-list pattern search options. (diff)
downloadtgif-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>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl3
1 files changed, 3 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c1e8bbc3cb..9061c4a75e 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;
}