From: Matthias Lederhofer Date: Sun, 17 Sep 2006 11:52:45 +0000 (+0200) Subject: gitweb fix validating pg (page) parameter X-Git-Tag: v1.4.3-rc1~85 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ac8e3f2bb8a790ca7810df18c3282d07e84ae345;p=git.git 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 --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 0fb86385c..c77270c7c 100755 --- 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"); } }