diff options
author | Thomas Bruederli <thomas@roundcube.net> | 2013-11-15 18:58:32 +0100 |
---|---|---|
committer | Thomas Bruederli <thomas@roundcube.net> | 2013-11-15 18:58:32 +0100 |
commit | f8101fff1ec4a52bde553e77a120fd8618c025aa (patch) | |
tree | 47133a91e84409b702d9f01e64d2ba98f2561fbe /program/lib | |
parent | f9a8189423a90cbe58c63d84a6dc21beaa795abc (diff) |
Accept text/html parts inside multipart/mixed parts as HTML contents
Diffstat (limited to 'program/lib')
-rw-r--r-- | program/lib/Roundcube/rcube_message.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index 278007610..f24ec3ed8 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -211,16 +211,19 @@ class rcube_message } $level = explode('.', $part->mime_id); + $depth = count($level); // Check if the part belongs to higher-level's multipart part - // this can be alternative/related/signed/encrypted, but not mixed + // this can be alternative/related/signed/encrypted or mixed while (array_pop($level) !== null) { - if (!count($level)) { + $parent_depth = count($level); + if (!$parent_depth) { return true; } $parent = $this->mime_parts[join('.', $level)]; - if (!preg_match('/^multipart\/(alternative|related|signed|encrypted)$/', $parent->mimetype)) { + if (!preg_match('/^multipart\/(alternative|related|signed|encrypted|mixed)$/', $parent->mimetype) + || ($parent->mimetype == 'multipart/mixed' && $parent_depth < $depth - 1)) { continue 2; } } |