diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-12-19 13:01:45 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-12-19 13:01:45 +0100 |
commit | c23dc87f2b76ac76968c73bc9f31920b316282c6 (patch) | |
tree | eb4ee495aaf089333f9d162258d8b19fabd196b9 /program/lib/Roundcube/rcube_message.php | |
parent | 9ac96015f274b9451377d05001097d0bb7526a27 (diff) |
Don't display message parts with unsupported text type, e.g. text/calendar
Diffstat (limited to 'program/lib/Roundcube/rcube_message.php')
-rw-r--r-- | program/lib/Roundcube/rcube_message.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index 08b94d8d9..c45dbfcd0 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -351,15 +351,22 @@ class rcube_message // print body if message doesn't have multiple parts if ($message_ctype_primary == 'text' && !$recursive) { + // parts with unsupported type add to attachments list + if (!in_array($message_ctype_secondary, array('plain', 'html', 'enriched'))) { + $this->attachments[] = $structure; + return; + } + $structure->type = 'content'; $this->parts[] = $structure; // Parse simple (plain text) message body - if ($message_ctype_secondary == 'plain') + if ($message_ctype_secondary == 'plain') { foreach ((array)$this->uu_decode($structure) as $uupart) { $this->mime_parts[$uupart->mime_id] = $uupart; $this->attachments[] = $uupart; } + } } // the same for pgp signed messages else if ($mimetype == 'application/pgp' && !$recursive) { |