My Various Git Projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e574fb
)
gitweb: Require a minimum of two character for the search text.
author
Robert Fitzsimons
<robfitz@273k.net>
Sat, 23 Dec 2006 03:35:15 +0000
(
03:35
+0000)
committer
Junio C Hamano
<junkio@cox.net>
Sat, 23 Dec 2006 07:18:41 +0000
(23:18 -0800)
Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl
patch
|
blob
|
history
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index
c1e8bbc
..
9061c4a
100755
(executable)
--- 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;
}