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: 5343
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: subbarao [...] computer.org
Cc:
AdminCc:

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

Attachments
multiline_querystring.patch



Subject: url() doesn't handle newlines properly when stripping query_string
Download (untitled) / with headers
text/plain 283b
the url() function in CGI.pm doesn't handle newlines properly when stripping query_string. For example, a query_string of foo%0Abar does not get properly stripped. The fix is simple. Just add the /s modifier to the regexp that strips the query string. Please see the attached patch.
*** /usr/lib/perl5/5.8.0/CGI.pm 2004-01-19 07:39:30.000000000 -0500 --- /tmp/CGI.pm 2004-02-15 16:43:09.000000000 -0500 *************** *** 2545,2551 **** if (exists($ENV{REQUEST_URI})) { my $index; $script_name = unescape($ENV{REQUEST_URI}); ! $script_name =~ s/\?.+$//; # strip query string # and path if (exists($ENV{PATH_INFO})) { my $encoded_path = unescape($ENV{PATH_INFO}); --- 2545,2551 ---- if (exists($ENV{REQUEST_URI})) { my $index; $script_name = unescape($ENV{REQUEST_URI}); ! $script_name =~ s/\?.+$//s; # strip query string # and path if (exists($ENV{PATH_INFO})) { my $encoded_path = unescape($ENV{PATH_INFO});


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.