summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-05-20 07:10:42 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-05-20 07:10:42 +0000
commited25df6dd32e653187381baba78f30927fc091c9 (patch)
tree11a59659e9c7c4202beb03b50834719fe6c5d1b5 /roundcubemail/program/include
parent57d3ccd32fe4091f2a733aad99b6c52f4f5fadfb (diff)
- Fix message/rfc822 attachments containing only attachments are not parsed properly (#1486743)
git-svn-id: https://svn.roundcube.net/trunk@3639 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
-rw-r--r--roundcubemail/program/include/rcube_message.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_message.php b/roundcubemail/program/include/rcube_message.php
index 8cb7b02ab..05b0151ef 100644
--- a/roundcubemail/program/include/rcube_message.php
+++ b/roundcubemail/program/include/rcube_message.php
@@ -393,7 +393,7 @@ class rcube_message
// ignore "virtual" protocol parts
else if ($primary_type == 'protocol')
continue;
-
+
// part is Microsoft Outlook TNEF (winmail.dat)
else if ($part_mimetype == 'application/ms-tnef') {
foreach ((array)$this->imap->tnef_decode($mail_part, $structure->headers['uid']) as $tnef_part) {
@@ -401,7 +401,6 @@ class rcube_message
$this->attachments[] = $tnef_part;
}
}
-
// part is a file/attachment
else if (preg_match('/^(inline|attach)/', $mail_part->disposition) ||
$mail_part->headers['content-id'] || (empty($mail_part->disposition) && $mail_part->filename)) {
@@ -418,9 +417,13 @@ class rcube_message
$mail_part->content_id = preg_replace(array('/^</', '/>$/'), '', $mail_part->headers['content-id']);
if ($mail_part->headers['content-location'])
$mail_part->content_location = $mail_part->headers['content-base'] . $mail_part->headers['content-location'];
-
+
$this->inline_parts[] = $mail_part;
}
+ // attachment encapsulated within message/rfc822 part needs further decoding (#1486743)
+ else if ($part_orig_mimetype == 'message/rfc822') {
+ $this->parse_structure($mail_part, true);
+ }
// is a regular attachment
else if (preg_match('!^[a-z0-9-.+]+/[a-z0-9-.+]+$!i', $part_mimetype)) {
if (!$mail_part->filename)