From 3db15995382ccf551aee8387ebb5ca073d197f27 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Wed, 22 Oct 2014 08:35:00 -0400
Subject: [PATCH] Fix download of attachments that are part of TNEF message (#1490091)
---
CHANGELOG | 1 +
program/steps/mail/get.inc | 3 ++-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 10f6ba1..f923311 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -5,6 +5,7 @@
- Fix regression in SHAA password generation in ldap driver of password plugin (#1490094)
- Fix displaying of HTML messages with absolutely positioned elements in Larry skin (#1490103)
- Fix font style display issue in HTML messages with styled <span> elements (#1490101)
+- Fix download of attachments that are part of TNEF message (#1490091)
RELEASE 1.0.3
-------------
diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index b10a052..8b9a039 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -356,7 +356,8 @@
}
// 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;
--
Gitblit v1.9.1