Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.6

Bug #6748 Mail_mimeDecode: _parseHeaderValue fails on filename with quote
Submitted: 2006-02-10 18:50 UTC
From: olaf dot wodrich at entrics dot de Assigned: alan_k
Status: Closed Package: Mail_mimeDecode (version 1.3.1)
PHP Version: Irrelevant OS:
Roadmaps: 1.6.0    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 8 + 6 = ?

 
 [2006-02-10 18:50 UTC] 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"

Comments

 [2006-04-27 14:35 UTC] cipri (Cipriano Groenendal)
Moved to Mail_MimeDecode subpackage.
 [2009-06-12 04:24 UTC] wyatt (Ryan Lederman)
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.
 [2010-09-02 16:22 UTC] alan_k (Alan Knowles)
-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/