summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-10-22 14:35:00 +0200
committerAleksander Machniak <alec@alec.pl>2014-10-22 14:35:00 +0200
commit3db15995382ccf551aee8387ebb5ca073d197f27 (patch)
tree2990cbaaec8bdbcb810bd1fdab39de517927fb46 /program
parent6bdbca38796bdcd7bd95deea9babce0cac6a8a36 (diff)
Fix download of attachments that are part of TNEF message (#1490091)
Diffstat (limited to 'program')
-rw-r--r--program/steps/mail/get.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index b10a052d6..8b9a0392c 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -356,7 +356,8 @@ else if (strlen($part_id)) {
}
// send part as-it-is
else {
- if ($part->body && empty($plugin['download'])) {
+ // here we trust attachments from TNEF/uuencode message are untouched (#1490091)
+ if ($part->body && (!is_numeric($part->mime_id) || empty($plugin['download']))) {
header("Content-Length: " . strlen($part->body));
echo $part->body;
$sent = true;