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

ID: 15888
Updated by: [email protected]
Reported By: alec at alec dot pl
Summary: attachment name/filename header lacks semicolon
separator
-Status: Verified
+Status: Closed
Type: Bug
Package: Mail_Mime
PHP Version: 5.2.8
-Assigned To:
+Assigned To: alec
Roadmap Versions:
New Comment:

-Status: Verified
+Status: Closed
-Assigned To:
+Assigned To: alec
This bug has been fixed in SVN. If this was a documentation problem,
the fix will appear on pear.php.net by the end of next Sunday (CET). If
this was a problem with the pear.php.net website, the change should be
live shortly. Otherwise, the fix will appear in the package's next
release. Thank you for the report and for helping us make PEAR better.


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

[2009-11-26 10:51:26] alec

test script for this bug:
--TEST--
Bug #15888 Semicolon separator for (Content-Type/Content-Disposition)
header parts
--SKIPIF--
--FILE--
<?php
error_reporting(E_ALL); // ignore E_STRICT
include('Mail/mime.php');
$filename = 'long name with spaces, very very very very long long long
long.txt';
$mimepart = new Mail_mimePart('');
echo $mimepart->_buildHeaderParam('filename', $filename, 'UTF-8');
?>
--EXPECT--
filename*0*=UTF-8''long%20name%20with%20spaces,%20very%20very%20very%20very;
filename*1*=%20long%20long%20long%20long.txt;

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

[2009-08-25 10:00:32] cweiske

-Status: Feedback
+Status: Verified


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

[2009-08-25 10:00:23] cweiske

http://trac.roundcube.net/ticket/1485727
http://groups.google.com/group/opera.mail+news/browse_thread/thread/af353c9052ce59ed

You are right. The standard says that distinct parts of an header need
to be separated by a semicolon. Since filename*0* and filename*1* are
different parts, even if they belong together, they need to have
semicolons between them.

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

[2009-08-25 09:55:32] cweiske

Sylpheed does not use filename*x* at all:

--Multipart=_Tue__25_Aug_2009_09_54_22_+0200_+xAiUIxEQre8wtG5
Content-Type: text/plain;
name="das hier ist ein sehr langer dateiname - und zwar so lang, dass
er nicht in eine zeile beim mime-zeug passt. was machen wir also hier
fragezeichen - einfach nichts, oder doch etwas fragezeichen.txt"
Content-Disposition: attachment;
filename="das hier ist ein sehr langer dateiname - und zwar so lang,
dass
er nicht in eine zeile beim mime-zeug passt. was machen wir also hier
fragezeichen - einfach nichts, oder doch etwas fragezeichen.txt"
Content-Transfer-Encoding: 7bit

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

[2009-08-25 09:43:09] alec

Also my bulk patch in #12411 addresses this issue.

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=15888

Search Discussions

  • Alec at Dec 18, 2009 at 1:49 pm
    Edit report at http://pear.php.net/bugs/bug.php?id=15888&edit=1

    ID: 15888
    Updated by: [email protected]
    Reported By: alec at alec dot pl
    Summary: attachment name/filename header lacks semicolon
    separator
    Status: Closed
    Type: Bug
    Package: Mail_Mime
    PHP Version: 5.2.8
    Assigned To: alec
    -Roadmap Versions:
    +Roadmap Versions: 1.5.3
    New Comment:

    -Roadmap Versions:
    +Roadmap Versions: 1.5.3



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

    [2009-12-17 13:02:02] alec

    -Status: Verified
    +Status: Closed
    -Assigned To:
    +Assigned To: alec
    This bug has been fixed in SVN. If this was a documentation problem,
    the fix will appear on pear.php.net by the end of next Sunday (CET). If
    this was a problem with the pear.php.net website, the change should be
    live shortly. Otherwise, the fix will appear in the package's next
    release. Thank you for the report and for helping us make PEAR better.

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

    [2009-11-26 10:51:26] alec

    test script for this bug:
    --TEST--
    Bug #15888 Semicolon separator for (Content-Type/Content-Disposition)
    header parts
    --SKIPIF--
    --FILE--
    <?php
    error_reporting(E_ALL); // ignore E_STRICT
    include('Mail/mime.php');
    $filename = 'long name with spaces, very very very very long long long
    long.txt';
    $mimepart = new Mail_mimePart('');
    echo $mimepart->_buildHeaderParam('filename', $filename, 'UTF-8');
    ?>
    --EXPECT--
    filename*0*=UTF-8''long%20name%20with%20spaces,%20very%20very%20very%20very;
    filename*1*=%20long%20long%20long%20long.txt;

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

    [2009-08-25 10:00:32] cweiske

    -Status: Feedback
    +Status: Verified


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

    [2009-08-25 10:00:23] cweiske

    http://trac.roundcube.net/ticket/1485727
    http://groups.google.com/group/opera.mail+news/browse_thread/thread/af353c9052ce59ed

    You are right. The standard says that distinct parts of an header need
    to be separated by a semicolon. Since filename*0* and filename*1* are
    different parts, even if they belong together, they need to have
    semicolons between them.

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

    [2009-08-25 09:55:32] cweiske

    Sylpheed does not use filename*x* at all:

    --Multipart=_Tue__25_Aug_2009_09_54_22_+0200_+xAiUIxEQre8wtG5
    Content-Type: text/plain;
    name="das hier ist ein sehr langer dateiname - und zwar so lang, dass
    er nicht in eine zeile beim mime-zeug passt. was machen wir also hier
    fragezeichen - einfach nichts, oder doch etwas fragezeichen.txt"
    Content-Disposition: attachment;
    filename="das hier ist ein sehr langer dateiname - und zwar so lang,
    dass
    er nicht in eine zeile beim mime-zeug passt. was machen wir also hier
    fragezeichen - einfach nichts, oder doch etwas fragezeichen.txt"
    Content-Transfer-Encoding: 7bit

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=15888

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 17, '09 at 12:02p
activeDec 18, '09 at 1:49p
posts2
users1
websitepear.php.net

1 user in discussion

Alec: 2 posts

People

Translate

site design / logo © 2023 Grokbase