From: Jakub Narebski Date: Tue, 19 Sep 2006 19:53:22 +0000 (+0200) Subject: gitweb: Require project for almost all actions X-Git-Tag: v1.4.3-rc1~74 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d04d3d424b913332f5c400162f0d87faac1ad3ea;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 5f597f71e..7fd2e1944 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;