Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 30538
Status: resolved
Priority: 0/
Queue: libwww-perl

Owner: Nobody in particular
Requestors: waif [...]

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

Subject: [HTTP::Request::Common] Does not handle filenames containing "
Date: Wed, 7 Nov 2007 00:22:29 -0800 (PST)
To: bug-libwww-perl [...]
From: Jacob J <waif [...]>
Download (untitled) / with headers
text/plain 965b
The function form_data in HTTP::Request::Common (1.28) does not correctly handle filenames containing the quote character ". Here's a fix: --- 2007-08-05 07:39:26.000000000 -0700 +++ 2007-11-07 00:20:39.000000000 -0800 @@ -134,6 +134,7 @@ $usename = $file; $usename =~ s,.*/,, if defined($usename); } + $usename =~ s/([\\\"])/\\$1/g if defined($usename); # escape quotes and backslashes my $disp = qq(form-data; name="$k"); $disp .= qq(; filename="$usename") if $usename; my $content = ""; ================= end diff ================ Without this fix, headers similar to the following are produced: --xYzZY Content-Disposition: form-data; name="file"; filename="qq"pp" Content-Type: text/plain blah blah blah --xYzZY-- (Note the filename field.) Other info: Perl v5.8.8 built for i686-linux Linux Thanks, - Jacob Post
Applied. Thanks!

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

Please report any issues with to