提交 7939fe44 编写于 作者: M Matthias Lederhofer 提交者: Junio C Hamano

gitweb: do not use 'No such directory' error message

undef $project; to prevent a file named description to be read.
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 800764cf
......@@ -198,13 +198,10 @@ sub feature_pickaxe {
our $project = $cgi->param('p');
if (defined $project) {
if (!validate_input($project)) {
die_error(undef, "Invalid project parameter");
}
if (!(-d "$projectroot/$project")) {
die_error(undef, "No such directory");
}
if (!(-e "$projectroot/$project/HEAD")) {
if (!validate_input($project) ||
!(-d "$projectroot/$project") ||
!(-e "$projectroot/$project/HEAD")) {
undef $project;
die_error(undef, "No such project");
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册