提交 13d02165 编写于 作者: M Martin Waitz 提交者: Junio C Hamano

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: NMartin Waitz <tali@admingilde.org>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 6132b7e4
......@@ -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");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册