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:
parent
02ac04fc9f
commit
ac8e3f2bb8
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user