Thread (11 messages) flat view 11 messages, 3 authors, 2016-06-15

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

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:28

Giuseppe Bilotta [off-list ref] wrote:
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.
quoted hunk ↗ jump to hunk
@@ -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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help