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

ID: 6748
Comment by: wyatt
Reported By: lederman at gmail dot com
Summary: Mail_mimeDecode: _parseHeaderValue fails on filename
with quote
Status: Open
Type: Bug
Package: Mail_mimeDecode
Package Version: 1.3.1
PHP Version: Irrelevant
New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[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"

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJun 11, '09 at 10:27p
activeJun 11, '09 at 10:27p
posts1
users1
websitepear.php.net

1 user in discussion

Wyatt: 1 post

People

Translate

site design / logo © 2022 Grokbase