Skip Menu |

This queue is for tickets about the MIME-tools CPAN distribution.

Report information
The Basics
Id: 6115
Status: resolved
Priority: 0/
Queue: MIME-tools

Owner: dmo+pause [...]
Requestors: jbarrett [...]

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


Subject: MIME::Head recommend_filename doesn't handle whitespace names
Download (untitled) / with headers
text/plain 509b
When parsing a MIME stream that has no filename set and a name set to " " (that is just whitespace) the recommended_filename return " " as well. This causes the to error when writing the body to the filesystem. write-open /tmp/msg-1082826762-60134-0/ : Is a directory at /usr/local/lib/perl5/site_perl/5.6.1/MIME/ line 414. The patch included returns undef for any names that include only whitespace. I am not a strong Perl programmer so their is probably a more efficient way to do this.
text/x-diff 388b
--- Sat Apr 24 10:02:27 2004 +++ Sat Apr 24 10:00:55 2004 @@ -771,7 +771,7 @@ ### No? Okay, try to get 'name' from the 'content-type': $value = $self->mime_attr(''); - return $value if (defined($value) and $value ne ''); + return $value if (defined($value) and $value ne '' and !($value =~ /^\s+$/)); ### Sorry: undef;
Resolved in upstream; will be fixed in _02 dev release

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

Please report any issues with to