[Tickets #8346] $conf['mailformat']['brokenrfc2231'] doesnt work, bug in Part.php
bugs at horde.org
bugs at horde.org
Mon Jun 15 08:54:11 UTC 2009
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/8346
------------------------------------------------------------------------------
Ticket | 8346
Created By | harakiri_23 at yahoo.com
Summary | $conf['mailformat']['brokenrfc2231'] doesnt work, bug
| in Part.php
Queue | Horde Framework Packages
Version | FRAMEWORK_3
Type | Bug
State | Unconfirmed
Priority | 2. Medium
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
harakiri_23 at yahoo.com (2009-06-15 04:54) wrote:
The workaround for the option brokenrfc2231 doesnt work, for longer
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
More information about the bugs
mailing list