summaryrefslogtreecommitdiff
path: root/program/include/rcube_message.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-10-20 12:24:21 +0000
committeralecpl <alec@alec.pl>2010-10-20 12:24:21 +0000
commit8794f16c620c58eb6d6505c988ed6bbbbec8dec7 (patch)
tree9c811a7e09616c25d6e6e0c66a3ae4cbbee49102 /program/include/rcube_message.php
parente0bd7054b7e566bf156e8afdc6d4c790fed0c0f2 (diff)
- Fix handling of attachments when Content-Disposition is not inline nor attachment (#1487051)
Diffstat (limited to 'program/include/rcube_message.php')
-rw-r--r--program/include/rcube_message.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index ec1359c86..89d65eb1e 100644
--- a/program/include/rcube_message.php
+++ b/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')