From 141933f9ebf7b3d4e8f2c265a3a542c58bd377d3 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 12 Apr 2011 13:57:41 +0000 Subject: [PATCH] Monotone-Parent: b0de250ad5fa2e4afb2daba52426ee8123e26ef1 Monotone-Revision: 6ab1e30417c6d736d1e01fa379f1ef179d460ba7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-04-12T13:57:41 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ SoObjects/Mailer/SOGoDraftObject.m | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 61d987866..688cdf298 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-04-12 Wolfgang Sourdeau + + * SoObjects/Mailer/SOGoDraftObject.m + (-bodyPartForAttachmentWithName:): don't choose "quoted-printable" + if the mimetype is anything else than "text/plain" or "text/html", + to avoid issues with filenames attached with a wrong mime type. + 2011-04-12 Francis Lachapelle * SoObjects/Appointments/SOGoAppointmentFolder.m diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index 6937fc9ef..b2804c824 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -1141,7 +1141,7 @@ static NSString *userAgent = nil; if ((s = [self contentTypeForAttachmentWithName:_name]) != nil) { [map setObject:s forKey: @"content-type"]; - if ([s hasPrefix: @"text/"]) + if ([s hasPrefix: @"text/plain"] || [s hasPrefix: @"text/html"]) attachAsString = YES; else if ([s hasPrefix: @"message/rfc822"]) is7bit = YES;