Edit report at http://pear.php.net/bugs/bug.php?id=6748&edit=1

ID: 6748
Updated by: alan@akbkhome.com
Reported By: olaf dot wodrich at entrics dot de
Summary: Mail_mimeDecode: _parseHeaderValue fails on filename
with quote
-Status: Open
+Status: Closed
Type: Bug
Package: Mail_mimeDecode
Package Version: 1.3.1
PHP Version: Irrelevant
-Assigned To:
+Assigned To: alan_k
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: alan_k
Thank you for your bug report. This issue has been fixed
in the latest released version of the package, which you can download at

Previous Comments:

[2009-06-12 00:24:46] wyatt

This appears to be due to the fact that the original implementation
tried to also use single quotes to match quoted-string values in a
header field.

RFC 2822 only defines DQUOTE as the valid character to surround a
quoted-string, so I believe this is wrong.

If you remove the escaped single-quotes from the regex in
_parseHeaderValue, it should work as expected.


[2006-04-27 10:35:11] cipri

Moved to Mail_MimeDecode subpackage.


[2006-02-10 13:50:34] olaf dot wodrich at entrics dot de

If the filename of an attachment contains (single) quote(s) the parsing
of that header part fails under certain conditions (not always). The
method returns that part unchanged (fallback). Long filenames that are
split into several parts seem to be a condition when this happens.

Test script:
Content-Type: audio/mpeg;
name*0="Grandmaster Flash and the Furious Five - It's Nasty (Genius of


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppear-bugs @
postedSep 2, '10 at 12:22p
activeSep 2, '10 at 12:22p

1 user in discussion

Alan: 1 post



site design / logo © 2022 Grokbase