Skip to content

Commit

Permalink
gitweb: fix project list if PATH_INFO=="/".
Browse files Browse the repository at this point in the history
The project list now uses several common header / footer generation functions.
These functions only check for "defined $project", but when PATH_INFO just
contains a "/" (which is often generated by web servers), then this test
fails.

Now explicitly undef $project if there is none so that the tests in other
gitweb parts work again.

Signed-off-by: Martin Waitz <tali@admingilde.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Martin Waitz authored and Junio C Hamano committed Aug 17, 2006
1 parent 6132b7e commit 13d0216
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@
if (defined $project) {
$project =~ s|^/||;
$project =~ s|/$||;
$project = undef unless $project;
}
if (defined $project && $project) {
if (defined $project) {
if (!validate_input($project)) {
die_error(undef, "Invalid project parameter");
}
Expand Down

0 comments on commit 13d0216

Please sign in to comment.