Skip to content

Commit

Permalink
gitweb fix validating pg (page) parameter
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthias Lederhofer authored and Junio C Hamano committed Sep 17, 2006
1 parent 02ac04f commit ac8e3f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ sub feature_pickaxe {

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

0 comments on commit ac8e3f2

Please sign in to comment.