summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6132b7e)
raw | patch | inline | side by side (parent: 6132b7e)
author | Martin Waitz <tali@admingilde.org> | |
Wed, 16 Aug 2006 22:28:40 +0000 (00:28 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 17 Aug 2006 10:04:46 +0000 (03:04 -0700) |
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>
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>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0dd24679dde0beed8aa8ffe5657420b3f9f6f229..cd9395df93be0b76d3831f3d6340e5e8a02898e7 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
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");
}