From ac8e3f2bb8a790ca7810df18c3282d07e84ae345 Mon Sep 17 00:00:00 2001 From: Matthias Lederhofer Date: Sun, 17 Sep 2006 13:52:45 +0200 Subject: [PATCH] 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 --- gitweb/gitweb.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); } } -- 2.30.2