Proposed patch - Re: [Catalyst-dev] May (can) I fix Catalyst/Engine/CGI.pm REDIRECT_URL + PATH_INFO bug?

Ashley apv at sedition.com
Wed Oct 22 23:27:24 BST 2008


On Oct 21, 2008, at 8:38 PM, Ashley wrote:
> This is an old bug I reported the first time about two years ago,  
> IIRC. Short version REDIRECT_URL + PATH_INFO can cause paths to get  
> squirrelly if there are regex chars, which URIs can legally have.
>
>> -        $base_path =~ s/$ENV{PATH_INFO}$//;
>> +        $base_path =~ s/\Q$ENV{PATH_INFO}\E$//;

Attached is an svn diff -- redirect_url_substitution.patch -- against  
Catalyst-Runtime/5.70/trunk, r8571. It updates t/ 
live_engine_request_uri.t, lib/Catalyst/Engine/CGI.pm, and Changes.

I didn't try to apply it but I'd be glad to (try at least) if a core  
dev reviews it, or modify it if anyone directs it. If someone would  
rather 'patch -p0', tweak, and commit yourself (as it were), that's  
fine too. :)

There is a related bug report from Chris Dolan outstanding -- http:// 
rt.cpan.org/Ticket/Display.html?id=24951 -- which can be closed if  
the patch is applied.

-Ashley
-- 
By the way, if you are going to work with this, please run the full  
tests first. Some are failing (for me) in r8571 so you should see  
that before trying my patch and then seeing it and thinking the patch  
is to blame.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: redirect_url_substitution.patch
Type: application/octet-stream
Size: 2600 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst-dev/attachments/20081022/ac2cc8d3/redirect_url_substitution.obj


More information about the Catalyst-dev mailing list