Summary | $conf['mailformat']['brokenrfc2231'] doesnt work, bug in Part.php |
Queue | Horde Framework Packages |
Queue Version | FRAMEWORK_3 |
Type | Bug |
State | Resolved |
Priority | 2. Medium |
Owners | slusarz (at) horde (dot) org |
Requester | harakiri_23 (at) yahoo (dot) com |
Created | 06/15/2009 (5858 days ago) |
Due | |
Updated | 06/17/2009 (5856 days ago) |
Assigned | 06/16/2009 (5857 days ago) |
Resolved | 06/17/2009 (5856 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
http://cvs.horde.org/diff.php/framework/MIME/MIME/Attic/Part.php?rt=horde&r1=1.177.4.26&r2=1.177.4.27&ty=u
State ⇒ Assigned
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ $conf['mailformat']['brokenrfc2231'] doesnt work, bug in Part.php
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
filenames at least (>50?).
The check (strpos($encode_2231, '*=') !== false)) will never return
true, simply because
$encode_2231 = MIME::encodeRFC2231($key, $value, $charset);
will not result in *= but in *0= *1= etc - an encoded string looks like this:
name*0="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
name*1="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
name*2="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
name*3="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.pdf"
there is no name*= for longer filenames. Only for shorter
Fix:
replace if with
if (!empty($GLOBALS['conf']['mailformat']['brokenrfc2231']) &&
((strpos($encode_2231, '*=') !== false) ||
(strpos($encode_2231, '*0=') !== false))) {
$ctype .= '; ' . $key . '="' . MIME::encode($value,
$charset) . '"';
}
in both places