gitweb: Require project for almost all actions
authorJakub Narebski <jnareb@gmail.com>
Tue, 19 Sep 2006 19:53:22 +0000 (21:53 +0200)
committerJunio C Hamano <junkio@cox.net>
Wed, 20 Sep 2006 16:49:39 +0000 (09:49 -0700)
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>
gitweb/gitweb.perl

index 5f597f7..7fd2e19 100755 (executable)
@@ -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;