Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
gitweb: do not use 'No such directory' error message
author
Matthias Lederhofer
<matled@gmx.net>
Sat, 16 Sep 2006 22:30:27 +0000
(
00:30
+0200)
committer
Junio C Hamano
<junkio@cox.net>
Sun, 17 Sep 2006 09:41:50 +0000
(
02:41
-0700)
undef $project; to prevent a file named description to be read.
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
800764c
)
diff --git
a/gitweb/gitweb.perl
b/gitweb/gitweb.perl
index 250138520fcc2c1116244379580c28bf9ba43bf3..fa657578fb8800e960606010415bc1d204dd0c8d 100755
(executable)
--- a/
gitweb/gitweb.perl
+++ b/
gitweb/gitweb.perl
@@
-198,13
+198,10
@@
sub feature_pickaxe {
our $project = $cgi->param('p');
if (defined $project) {
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");
}
}
die_error(undef, "No such project");
}
}