From b09bdab3cac76b130fea2a6b864805824235d243 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Wed, 22 Jun 2016 16:35:05 -0400 Subject: [PATCH] Fix attachment filename with no extension --- NEWS | 3 +++ UI/MailPartViewers/UIxMailPartViewer.m | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 31c2fa00a..1ff37f205 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,9 @@ Enhancements - [core] avoid showing bundle loading info when not needed (#3726) - [core] when restoring data using sogo-tool, regenerate Sieve script (#3029) +Bug fixes + - [web] fixed crash when an attachment filename has no extension + 2.3.12 (2016-06-10) ------------------- diff --git a/UI/MailPartViewers/UIxMailPartViewer.m b/UI/MailPartViewers/UIxMailPartViewer.m index 1fc29721d..bb411e582 100644 --- a/UI/MailPartViewers/UIxMailPartViewer.m +++ b/UI/MailPartViewers/UIxMailPartViewer.m @@ -270,7 +270,7 @@ if ([filename length]) // We replace any slash by a dash since Apache won't allow encoded slashes by default. // See http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes - filename = (NSMutableString *)[filename stringByReplacingString: @"/" withString: @"-"]; + filename = [NSMutableString stringWithString: [filename stringByReplacingString: @"/" withString: @"-"]]; else [filename appendFormat: @"%@-%@", [self labelForKey: @"Untitled"],