git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH (amend)] gitweb: Require project for almost all actions

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 19, 2006, 19:53 UTC
Message-ID
<200609192153.22618.jnareb@gmail.com>

Require that project (repository) is given for all actions except project_list, project_index and opml.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
 gitweb/gitweb.perl |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 034cdf1..34311ee 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -341,6 +341,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;
 
-- 
1.4.2.1
Message 1 of 1 in “gitweb: Require project for almost all actions”
  1. gitweb: Require project for almost all actionsJakub Narebski, Sep 19, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.