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

Re: gitweb search page link slightly wrong

From
Johannes Berg <johannes@sipsolutions.net>
Date
May 1, 2007, 10:13 UTC
Message-ID
<1178014409.3483.12.camel@johannes.berg>
In-Reply-To
<1177706593.3565.59.camel@johannes.berg>

This seems to fix it but I have no idea what it breaks. Command injection should be stopped a few lines above that, and no other parameter is ever quoted using quotemeta, so I'm not sure what the point is, but I suppose it is actually necessary because the search text is then wrapped into a regular expression or something?

--- git.orig/gitweb/gitweb.perl 2007-05-01 11:58:27.000000000 +0200 +++ git/gitweb/gitweb.perl 2007-05-01 12:11:56.000000000 +0200

@@ -368,7 +368,6 @@ if (defined $searchtext) {
 	if (length($searchtext) < 2) {
 		die_error(undef, "At least two characters are required for search parameter");
 	}
-	$searchtext = quotemeta $searchtext;
 }
 
 our $searchtype = $cgi->param('st');
Previous: Johannes BergNext: Johannes Berg
Message 2 of 3 in “gitweb search page link slightly wrong”
  1. Johannes BergApr 27, 2007
  2. Johannes BergMay 1, 2007
  3. Johannes BergMay 1, 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.