@matheusbsbs / matheus-bagliano / commits / ac8e3f2bb8
Fork 0

gitweb fix validating pg (page) parameter

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>

Matthias Lederhofer committed Sep 17, 2006 at 13:52 UTC ac8e3f2bb8a790ca7810df18c3282d07e84ae345
1 file changed +1 -1
gitweb/gitweb.perl
+1 -1
@@ -256,7 +256,7 @@ if (defined $hash_parent_base) {
256
257 our $page = $cgi->param('pg');
258 if (defined $page) {
259 - if ($page =~ m/[^0-9]$/) {
259 + if ($page =~ m/[^0-9]/) {
260 die_error(undef, "Invalid page parameter");
261 }
262 }