Browse Source

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>
maint
Matthias Lederhofer 19 years ago committed by Junio C Hamano
parent
commit
ac8e3f2bb8
  1. 2
      gitweb/gitweb.perl

2
gitweb/gitweb.perl

@ -256,7 +256,7 @@ if (defined $hash_parent_base) { @@ -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");
}
}

Loading…
Cancel
Save