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

[PATCH 2/3] gitweb: Lift any characters restriction on searched strings

From
Petr Baudis <pasky@suse.cz>
Date
May 19, 2007, 00:13 UTC
Message-ID
<20070519001334.28618.30675.stgit@rover>
In-Reply-To
<20070519001329.28618.31334.stgit@rover>

Everything is already fully quoted along the way so I believe this to be unnecessary at this point. It would pose trouble for regexp searches.

Signed-off-by: Petr Baudis <pasky@suse.cz>
---
 gitweb/gitweb.perl |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index 0143183..4ccb4e3 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -404,9 +404,6 @@ if (defined $searchtype) {
 our $searchtext = $cgi->param('s');
 our $search_regexp;
 if (defined $searchtext) {
-	if ($searchtype ne 'grep' and $searchtype ne 'pickaxe' and $searchtext =~ m/[^a-zA-Z0-9_\.\/\-\+\:\@ ]/) {
-		die_error(undef, "Invalid search parameter");
-	}
 	if (length($searchtext) < 2) {
 		die_error(undef, "At least two characters are required for search parameter");
 	}
Previous: Petr BaudisNext: Petr Baudis
Message 2 of 3 in “git-rev-list: Add regexp tuning options”
  1. 1/3 git-rev-list: Add regexp tuning optionsPetr Baudis, May 19, 2007
  2. 2/3 gitweb: Lift any characters restriction on searched stringsPetr Baudis, May 19, 2007
  3. 3/3 gitweb: Clearly distinguish regexp / exact match searchesPetr Baudis, May 19, 2007

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.