summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-10-20 12:24:21 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-10-20 12:24:21 +0000
commit4d17434c12bad87c3c661c86b4f24c47d8d4eb03 (patch)
treeecdc22e88303d13c5187d42f082a6ff477e932ab
parent8345d029b747611ac09c488fad0056f840894f4d (diff)
- Fix handling of attachments when Content-Disposition is not inline nor attachment (#1487051)
git-svn-id: https://svn.roundcube.net/trunk@4116 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/CHANGELOG1
-rw-r--r--roundcubemail/program/include/rcube_message.php4
2 files changed, 4 insertions, 1 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG
index 7f6c57bf8..b1502152d 100644
--- a/roundcubemail/CHANGELOG
+++ b/roundcubemail/CHANGELOG
@@ -36,6 +36,7 @@ CHANGELOG Roundcube Webmail
- Add ANNOTATEMORE extension support into IMAP classes (draft-daboo-imap-annotatemore)
- Add METADATA extension support into IMAP classes (RFC5464)
- Fix decoding of e-mail address strings in message headers (#1487068)
+- Fix handling of attachments when Content-Disposition is not inline nor attachment (#1487051)
RELEASE 0.4.2
-------------
diff --git a/roundcubemail/program/include/rcube_message.php b/roundcubemail/program/include/rcube_message.php
index ec1359c86..89d65eb1e 100644
--- a/roundcubemail/program/include/rcube_message.php
+++ b/roundcubemail/program/include/rcube_message.php
@@ -448,7 +448,9 @@ class rcube_message
}
// 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)
+ $mail_part->headers['content-id'] ||
+ ($mail_part->filename &&
+ (empty($mail_part->disposition) || preg_match('/^[a-z0-9!#$&.+^_-]+$/i', $mail_part->disposition)))
) {
// skip apple resource forks
if ($message_ctype_secondary == 'appledouble' && $secondary_type == 'applefile')