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 коммит произвёл Junio C Hamano
Родитель 02ac04fc9f
Коммит ac8e3f2bb8
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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");
}
}