aboutsummaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorJakub Narebski <jnareb@gmail.com>2006-08-05 13:16:03 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-06 01:59:45 -0700
commit668e34d7cc1ab7d6135f0004ee7bea2ffdca0de0 (patch)
tree2ecb1bb71cbf3738c9feeb48ae23788e6d77054e /gitweb
parente2860ead31579a15ee94831f2b9b55e43caa2cac (diff)
downloadgit-668e34d7cc1ab7d6135f0004ee7bea2ffdca0de0.tar.gz
git-668e34d7cc1ab7d6135f0004ee7bea2ffdca0de0.tar.xz
gitweb: PATH_INFO=/ means no project
Prepared for refactoring input validation. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.perl4
1 files changed, 2 insertions, 2 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 2e2629ca5..fdba15e2b 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -86,8 +86,8 @@ if (defined $action) {
}
our $project = ($cgi->param('p') || $ENV{'PATH_INFO'});
-if (defined $project) {
- $project =~ s|^/||; $project =~ s|/$||;
+$project =~ s|^/||; $project =~ s|/$||;
+if (defined $project && $project) {
if (!validate_input($project)) {
die_error(undef, "Invalid project parameter");
}