aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorMatthias Lederhofer <matled@gmx.net>2006-09-17 00:30:27 +0200
committerJunio C Hamano <junkio@cox.net>2006-09-17 02:41:50 -0700
commit7939fe44b8abedb4d8bb5090aec7a92eb1aa7a4b (patch)
tree54018f9594e0d4a7acd27838ba3c4ea2cc40cdd2 /gitweb
parent800764cf335cb4de289269c919e865c536635885 (diff)
downloadgit-7939fe44b8abedb4d8bb5090aec7a92eb1aa7a4b.tar.gz
git-7939fe44b8abedb4d8bb5090aec7a92eb1aa7a4b.tar.xz
gitweb: do not use 'No such directory' error message
undef $project; to prevent a file named description to be read. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl11
1 files changed, 4 insertions, 7 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 250138520..fa657578f 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -198,13 +198,10 @@ if (defined $action) {
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");
}
}