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

[PATCH/RFC 1/6] gitweb: Allow underscore in $searchtype ('st')

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 29, 2011, 11:52 UTC
Message-ID
<1311940379-9608-2-git-send-email-jnareb@gmail.com>
In-Reply-To
<1311940379-9608-1-git-send-email-jnareb@gmail.com>

This makes searchtype containing underscore '_' to pass parameter validation in evaluate_and_validate_params().

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
This is not necessary in this series, and could be left for later when
we need it.
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index f858d1b..7ec1621 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1057,7 +1057,7 @@ sub evaluate_and_validate_params {
 
 	our $searchtype = $input_params{'searchtype'};
 	if (defined $searchtype) {
-		if ($searchtype =~ m/[^a-z]/) {
+		if ($searchtype =~ m/[^a-z_]/) {
 			die_error(400, "Invalid searchtype parameter");
 		}
 	}
-- 
1.7.5
Previous: Jakub NarebskiNext: Jakub Narebski
Message 2 of 8 in “gitweb: Improve project search”
  1. 0/6 gitweb: Improve project searchJakub Narebski, Jul 29, 2011
  2. 1/6 gitweb: Allow underscore in $searchtype ('st')Jakub Narebski, Jul 29, 2011
  3. 2/6 gitweb: Improve projects search formJakub Narebski, Jul 29, 2011
  4. 3/6 gitweb: Option for filling only specified info in fill_project_list_infoJakub Narebski, Jul 29, 2011
  5. 4/6 gitweb: Faster project searchJakub Narebski, Jul 29, 2011
  6. 5/6 gitweb: Highlight matched part of project name when searching projectsJakub Narebski, Jul 29, 2011
  7. 6/6 gitweb: Highlight matched part of project description when searching projectsJakub Narebski, Jul 29, 2011
  8. 7/6 gitweb: Use esc_html_match_hl in 'grep' searchJakub Narebski, Jul 30, 2011

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.