summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-04-17 11:05:06 +0200
committerAleksander Machniak <alec@alec.pl>2015-04-17 11:05:06 +0200
commit5b737d9f8ddd185db1f316d2922dcbcc654706b6 (patch)
treeb7e9a93a30b65562a06fe1efbcdf8e50009bfbb1
parent09225a41ec7135031a4c0304b8dcdccd45904939 (diff)
Fix bug where some unrelated attachments in multipart/related message were not listed (#1490355)
-rw-r--r--CHANGELOG1
-rw-r--r--program/lib/Roundcube/rcube_message.php8
2 files changed, 6 insertions, 3 deletions
diff --git a/CHANGELOG b/CHANGELOG
index c3049eb73..c6fb09b81 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -19,6 +19,7 @@ CHANGELOG Roundcube Webmail
- Fix lack of signature separator for plain text signatures in html mode (#1490352)
- Fix font artifact in Google Chrome on Windows (#1490353)
- Fix bug where forced extwin page reload could exit from the extwin mode (#1490350)
+- Fix bug where some unrelated attachments in multipart/related message were not listed (#1490355)
RELEASE 1.1.1
-------------
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
index 26248a5b1..441358498 100644
--- a/program/lib/Roundcube/rcube_message.php
+++ b/program/lib/Roundcube/rcube_message.php
@@ -579,8 +579,10 @@ class rcube_message
$related_part = $p;
else if ($sub_mimetype == 'text/plain' && !$plain_part)
$plain_part = $p;
- else if ($sub_mimetype == 'text/html' && !$html_part)
+ else if ($sub_mimetype == 'text/html' && !$html_part) {
$html_part = $p;
+ $this->got_html_part = true;
+ }
else if ($sub_mimetype == 'text/enriched' && !$enriched_part)
$enriched_part = $p;
else {
@@ -705,7 +707,7 @@ class rcube_message
continue;
if ($part_mimetype == 'text/html' && $mail_part->size) {
- $got_html_part = true;
+ $this->got_html_part = true;
}
$mail_part = $plugin['structure'];
@@ -825,7 +827,7 @@ class rcube_message
// MS Outlook sends sometimes non-related attachments as related
// In this case multipart/related message has only one text part
// We'll add all such attachments to the attachments list
- if (!isset($got_html_part) && empty($inline_object->content_id)) {
+ if (!isset($this->got_html_part)) {
$this->attachments[] = $inline_object;
}
// MS Outlook sometimes also adds non-image attachments as related