Browse Source

gitweb: PATH_INFO=/ means no project

Prepared for refactoring input validation.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Jakub Narebski 19 years ago committed by Junio C Hamano
parent
commit
668e34d7cc
  1. 4
      gitweb/gitweb.perl

4
gitweb/gitweb.perl

@ -86,8 +86,8 @@ if (defined $action) { @@ -86,8 +86,8 @@ if (defined $action) {
}

our $project = ($cgi->param('p') || $ENV{'PATH_INFO'});
if (defined $project) {
$project =~ s|^/||; $project =~ s|/$||;
$project =~ s|^/||; $project =~ s|/$||;
if (defined $project && $project) {
if (!validate_input($project)) {
die_error(undef, "Invalid project parameter");
}

Loading…
Cancel
Save