summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorLibravatar Jakub Narebski <jnareb@gmail.com>2006-09-19 21:53:22 +0200
committerLibravatar Junio C Hamano <junkio@cox.net>2006-09-20 09:49:39 -0700
commitd04d3d424b913332f5c400162f0d87faac1ad3ea (patch)
tree0cb95618d6cebc194cab157489a449efeb84af50 /gitweb
parentgitweb: Even more support for PATH_INFO based URLs (diff)
downloadtgif-d04d3d424b913332f5c400162f0d87faac1ad3ea.tar.xz
gitweb: Require project for almost all actions
Require that project (repository) is given for all actions except project_list, project_index and opml. 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, 4 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 5f597f71e0..7fd2e19446 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -352,6 +352,10 @@ if (defined $project) {
if (!defined($actions{$action})) {
die_error(undef, "Unknown action");
}
+if ($action !~ m/^(opml|project_list|project_index)$/ &&
+ !$project) {
+ die_error(undef, "Project needed");
+}
$actions{$action}->();
exit;