Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 25908
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: zagap [...] users.sourceforge.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: url() method doesn't complete remove query string from REQUEST_URI
Download (untitled) / with headers
text/plain 200b
If REQUEST_URI consists %0A ( escaped new line ), then method url(-absolute => 1, -path_info => 1) return invalide result. url_complete_clear_req.t - test script url_complete_clear_req.patch - patch
Subject: url_complete_clear_req.t
#!/usr/bin/perl use strict; use warnings; use Test::More tests => 1; use CGI; $ENV{'REQUEST_URI'} = q!/CP/mod_user_distrjs/Set_template?form=edit_tmpl&code=1%0A&par2=1!; my $cgi = new CGI::; is( $cgi->url( -absolute => 1, -path_info => 1 ), '/CP/mod_user_distrjs/Set_template', "Complete remove query string")
Subject: url_complete_clear_req.patch
--- /usr/local/lib/perl5/site_perl/5.8.8/CGI.pm Sat Feb 24 02:03:16 2007 +++ CGI.pm Thu Mar 29 16:06:14 2007 @@ -2701,7 +2700,7 @@ undef $path if $rewrite_in_use && $rewrite; # path not valid when rewriting active my $uri = $rewrite && $request_uri ? $request_uri : $script_name; - $uri =~ s/\?.*$//; # remove query string + $uri =~ s/\?.*$//s; # remove query string $uri =~ s/\Q$path\E$// if defined $path; # remove path if ($full) {
Download (untitled) / with headers
text/plain 479b
On Thu Mar 29 08:21:46 2007, ZAG wrote: Show quoted text
> If REQUEST_URI consists %0A ( escaped new line ), then method > url(-absolute => 1, -path_info => 1) return invalide result. > > url_complete_clear_req.t - test script > url_complete_clear_req.patch - patch
I've just hit this one too. A fix is in line 2699, (IN VERSION 3.29) change $uri =~ s/\?.*$//; # remove query string to $uri =~ s/\?.*$//s; # remove query string
This will be fixed when 3.41 is released.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.