projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02ac04f
)
gitweb fix validating pg (page) parameter
author
Matthias Lederhofer
<matled@gmx.net>
Sun, 17 Sep 2006 11:52:45 +0000
(13:52 +0200)
committer
Junio C Hamano
<junkio@cox.net>
Sun, 17 Sep 2006 22:10:23 +0000
(15:10 -0700)
Currently it is possible to give any string ending with a number as
page. -1 for example is quite bad (error log shows probably 100
warnings).
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 0fb86385c94a72c08fce4bc0b2c54c1461ad2bc6..c77270c7cd7ef478f708dbbc6165ac420891ca5a 100755
(executable)
--- a/
gitweb/gitweb.perl
+++ b/
gitweb/gitweb.perl
@@
-256,7
+256,7
@@
if (defined $hash_parent_base) {
our $page = $cgi->param('pg');
if (defined $page) {
- if ($page =~ m/[^0-9]
$
/) {
+ if ($page =~ m/[^0-9]/) {
die_error(undef, "Invalid page parameter");
}
}