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

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

From: Jakub Narebski <hidden>
Date: 2016-06-15 22:45:27

Giuseppe Bilotta wrote:
On Tue, Oct 7, 2008 at 4:39 PM, Jakub Narebski [off-list ref] wrote:
quoted
Giuseppe Bilotta wrote:
quoted
Wouldn't it be simpler and as good solution to just leave validation
off evaluate_path_info() (well, of course except check_head_link() test),
and allow it to be validated when assigning global 'params' variables?
check_head_link() would be repeated for path_info links, but that
should not affect performance much.
Well, it does have a performance hit in the case of invalid $project
since it spends time working on the rest of the URL before bailing
out, but it's probably the cleanest solution. I'll do it this way.
I have forgot about this fact, that parameter validation serves also
as early escape. But I don't think it is much performance hit in
practice; it is performance (optimization) vs. maintability tradeoff.

-- 
Jakub Narebski
Poland
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help