From d04d3d424b913332f5c400162f0d87faac1ad3ea Mon Sep 17 00:00:00 2001 From: Jakub Narebski Date: Tue, 19 Sep 2006 21:53:22 +0200 Subject: [PATCH] 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 --- gitweb/gitweb.perl | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.26.2