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

Re: [PATCHv2] gitweb: refactor input parameters parse/validation

From
Shawn O. Pearce <spearce@spearce.org>
Date
Oct 10, 2008, 15:01 UTC
Message-ID
<20081010150108.GC29829@spearce.org>
In-Reply-To
<1223457985-27094-1-git-send-email-giuseppe.bilotta@gmail.com>
Giuseppe Bilotta <giuseppe.bilotta@gmail.com> wrote:
Show 5 quoted lines
> Since input parameters can be obtained both from CGI parameters and
> PATH_INFO, we would like most of the code to be agnostic about the way
> parameters were retrieved. We thus collect all the parameters into the
> new %input_params hash, delaying validation after the collection is
> completed.
Show 9 quoted lines
> @@ -672,6 +694,25 @@ sub href (%) {
>  ## ======================================================================
>  ## validation, quoting/unquoting and escaping
>  
> +sub validate_action {
> +	my $input = shift || return undef;
> +	return undef unless exists $actions{$action};
> +	return $action;
> +}
Shouldn't $action here be $input?
-- 
Shawn.
Previous: Jakub NarebskiNext: Giuseppe Bilotta
Message 9 of 11 in “gitweb: refactor input parameters parse/validation”
  1. gitweb: refactor input parameters parse/validationGiuseppe Bilotta, Oct 3, 2008
  2. Jakub NarebskiOct 7, 2008
  3. Giuseppe BilottaOct 7, 2008
  4. Jakub NarebskiOct 7, 2008
  5. Giuseppe BilottaOct 8, 2008
  6. Jakub NarebskiOct 8, 2008
  7. [PATCHv2] gitweb: refactor input parameters parse/validationGiuseppe Bilotta, Oct 8, 2008
  8. Jakub NarebskiOct 10, 2008
  9. Shawn O. PearceOct 10, 2008
  10. Giuseppe BilottaOct 10, 2008
  11. [PATCHv3] gitweb: refactor input parameters parse/validationGiuseppe Bilotta, Oct 10, 2008

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.