Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Email::MIME bug?

by Arik123 (Beadle)
on Jul 06, 2021 at 09:52 UTC ( [id://11134694]=perlquestion: print w/replies, xml ) Need Help??

Arik123 has asked for the wisdom of the Perl Monks concerning the following question:

I'm parsing a multipart MIME email, which contains the line:

Content-Type: image/png; name="=?UTF-8?B?15DXmdeZ15PXmSDXqNeWLnBuZw==?="

My code contains:

$email = Email::MIME->new (\$msg); $email->walk_parts( sub { return if $_[0]->subparts; print $_[0]->filename; } );

This produces the following warning:

Unquoted '"' not allowed at ./em_try.pl line 21. Missing semicolon before parameter '"אייד&#149 +7; רז.png"' at ./em_try.pl line 21.

I think it happens only on utf8 filenames, and I think it's a bug. What do you think?

Replies are listed 'Best First'.
Re: Email::MIME bug?
by hippo (Bishop) on Jul 06, 2021 at 09:58 UTC

    Sounds like this. Maybe look at the mentioned PRs?


    🦛

      Not exactly. His problem arised at new(), and my problem arised at filename(). My call to new() went without a problem, as my Email::MIME already contained his patch.

      However, following his example, I patched the filename() method, and my problem vanished. I changed

       my $dis = $self->header("Content-Disposition") || '';

      to:

       my $dis = $self->header_raw("Content-Disposition") || '';

      In my Email::MIME, it's in line 453.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11134694]
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-25 09:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found