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

Bug #15888 attachment name/filename header lacks semicolon separator
Submitted: 2009-02-10 07:44 UTC Modified: 2009-12-18 14:49 UTC
From: alec Assigned: alec
Status: Closed Package: Mail_Mime
PHP Version: 5.2.8 OS:
Roadmaps: 1.5.3    
Subscription  


 [2009-02-10 07:44 UTC] alec (Aleksander Machniak)
Description: ------------ Now: Content-Disposition: attachment; filename*0*="UTF-8''very long long long filename filename filename foo bar" filename*1*="boo baz bang"; Should be: Content-Disposition: attachment; filename*0*="UTF-8''very long long long filename filename filename foo bar"; filename*1*="boo baz bang"; Test script: --------------- Expected result: ---------------- Actual result: --------------

Comments

 [2009-02-11 06:32 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Feedback
We are unable to reproduce the bug as reported. Please provide a simple script (10 lines or less) or a link to an external script that can be used to reproduce the bug. If you can provide the script, feel free to add it to this bug and change the status back to "Open". Thank you for your interest in PEAR. Can you attach a small reproducable executable test case?
 [2009-08-25 06:44 UTC] cweiske (Christian Weiske)
-Status: Feedback +Status: No Feedback
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you.
 [2009-08-25 08:27 UTC] alec (Aleksander Machniak)
This is still not fixed. One line patch for _buildHeaderParam(): - $headers = implode(MAIL_MIMEPART_CRLF, $headers) . ';'; + $headers = implode(';' . MAIL_MIMEPART_CRLF, $headers) . ';';
 [2009-08-25 08:30 UTC] cweiske (Christian Weiske)
-Status: No Feedback +Status: Feedback
Alec, could you please provide a test script that demonstrates the problem? Without it, we cannot do anything.
 [2009-08-25 08:41 UTC] alec (Aleksander Machniak)
<?php include('Mail/mime.php'); $filename = 'long name with spaces, very long long long long.txt'; $mimepart = new Mail_mimePart(''); echo $mimepart->_buildHeaderParam('filename', $filename, 'UTF-8'); ?>
 [2009-08-25 08:43 UTC] alec (Aleksander Machniak)
Also my bulk patch in #12411 addresses this issue.
 [2009-08-25 08:55 UTC] cweiske (Christian Weiske)
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:00 UTC] cweiske (Christian Weiske)
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:00 UTC] cweiske (Christian Weiske)
-Status: Feedback +Status: Verified
 [2009-11-26 10:51 UTC] alec (Aleksander Machniak)
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-12-17 13:02 UTC] alec (Aleksander Machniak)
-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-12-18 14:49 UTC] alec (Aleksander Machniak)
-Roadmap Versions: +Roadmap Versions: 1.5.3