Subject: | HTTP::Body::MultiPart - remove zero characters (\0) from filename in Content-Disposition |
Zero character in filename causes fail in tempfile "Error in tempfile() using template /tmp/XXXXXXXXXX"
Diff was attached
Subject: | http_body_multipart.diff |
@@ -268,9 +268,6 @@
my ($filename) = $disposition =~ / filename="?([^\"]*)"?/;
# Need to match empty filenames above, so this part is flagged as an upload type
+ # strip zero character from filename
+ $filename =~ s/\0//g;
+
$part->{name} = $name;
if ( defined $filename ) {