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>
This commit is contained in:
Matthias Lederhofer 2006-09-17 13:52:45 +02:00 committed by Junio C Hamano
parent 02ac04fc9f
commit ac8e3f2bb8

View File

@ -256,7 +256,7 @@ if (defined $hash_parent_base) {
our $page = $cgi->param('pg'); our $page = $cgi->param('pg');
if (defined $page) { if (defined $page) {
if ($page =~ m/[^0-9]$/) { if ($page =~ m/[^0-9]/) {
die_error(undef, "Invalid page parameter"); die_error(undef, "Invalid page parameter");
} }
} }