summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2015-04-08 08:56:42 +0200
committerAleksander Machniak <alec@alec.pl>2015-04-08 08:56:42 +0200
commit292292df32a5d3f8db2cfc266fb4a8f7dbf52468 (patch)
tree8954b7d83459f8b1cbb9f40cfd5e9c0adc409507
parent98e4614b0da073b04ba54bfee1df3491dcea6762 (diff)
Fix so unrecognized TNEF attachments are displayed on the list of attachments (#1490351)
-rw-r--r--CHANGELOG1
-rw-r--r--program/lib/Roundcube/rcube_message.php11
2 files changed, 11 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 216a29b67..6dbbecf7a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,6 +13,7 @@ CHANGELOG Roundcube Webmail
- Fix tables listing routine on mysql and postgres so it skips system or other database tables and views (#1490337)
- Fix message list header in classic skin on window resize in Internet Explorer (#1490213)
- Fix so text/calendar parts are listed as attachments even if not marked as such (#1490325)
+- Fix so unrecognized TNEF attachments are displayed on the list of attachments (#1490351)
RELEASE 1.1.1
-------------
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
index 449a3c3b4..6c6248ebe 100644
--- a/program/lib/Roundcube/rcube_message.php
+++ b/program/lib/Roundcube/rcube_message.php
@@ -739,10 +739,19 @@ class rcube_message
}
// part is Microsoft Outlook TNEF (winmail.dat)
else if ($part_mimetype == 'application/ms-tnef') {
- foreach ((array)$this->tnef_decode($mail_part) as $tpart) {
+ $tnef_parts = (array) $this->tnef_decode($mail_part);
+ foreach ($tnef_parts as $tpart) {
$this->mime_parts[$tpart->mime_id] = $tpart;
$this->attachments[] = $tpart;
}
+
+ // add winmail.dat to the list if it's content is unknown
+ if (empty($tnef_parts) && !empty($mail_part->filename)) {
+ $this->mime_parts[$mail_part->mime_id] = $mail_part;
+ $this->attachments[] = $mail_part;
+ }
+
+ $tnef_parts = null;
}
// part is a file/attachment
else if (preg_match('/^(inline|attach)/', $mail_part->disposition) ||