- Workaround for setting charset in case of malformed bodystructure response (#1487700)

release-0.6
alecpl 14 years ago
parent a76cbddfc9
commit 824144214f

@ -4,6 +4,7 @@ CHANGELOG Roundcube Webmail
- Fix login redirect issues (#1487686)
- Require PHP 5.2.1 or greater
- Fix %h/%z variables in username_domain option (#1487701)
- Workaround for setting charset in case of malformed bodystructure response (#1487700)
RELEASE 0.5
-----------

@ -2053,7 +2053,7 @@ class rcube_imap
return false;
}
$struct = &$this->_structure_part($structure);
$struct = &$this->_structure_part($structure, 0, '', $headers);
$struct->headers = get_object_vars($headers);
// don't trust given content-type
@ -2185,6 +2185,11 @@ class rcube_imap
$struct->charset = $struct->ctype_parameters['charset'];
}
// #1487700: workaround for lack of charset in malformed structure
if (empty($struct->charset) && !empty($mime_headers) && $mime_headers->charset) {
$struct->charset = $mime_headers->charset;
}
// read content encoding
if (!empty($part[5]) && $part[5]!='NIL') {
$struct->encoding = strtolower($part[5]);

Loading…
Cancel
Save