Bug #6748 [Opn->Csd]: Mail_mimeDecode: _parseHeaderValue fails on filename with quote

From: Date: Thu, 02 Sep 2010 12:22:11 +0000
Subject: Bug #6748 [Opn->Csd]: Mail_mimeDecode: _parseHeaderValue fails on filename with quote
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-4733@lists.php.net to get a copy of this message
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 http://pear.php.net/get/ 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 Description: ------------ 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 L"; name*1="ove).mp3" ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=6748&edit=1

« previous php.pear.bugs (#4733) next »