From: Martin Waitz Date: Wed, 16 Aug 2006 22:28:40 +0000 (+0200) Subject: gitweb: fix project list if PATH_INFO=="/". X-Git-Tag: v1.4.3-rc1~168^2~43 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=13d02165042c6139905dad38ee8324780d771d99;p=git.git gitweb: fix project list if PATH_INFO=="/". 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 Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 0dd24679d..cd9395df9 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -95,8 +95,9 @@ our $project = ($cgi->param('p') || $ENV{'PATH_INFO'}); 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"); }