From 6f59955340a34863576fca2e851d2df4b5aca200 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 8 Apr 2015 13:33:54 -0400 Subject: [PATCH] (fix) sanitize autoReplyEmailAddresses --- UI/PreferencesUI/UIxPreferences.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index dd40a1c94..67c344bf5 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -2084,8 +2084,8 @@ static NSArray *reminderValues = nil; // Proceed with data sanitization of the "defaults" if ((v = [o objectForKey: @"defaults"])) { + NSArray *allKeys, *accounts, *addresses; NSMutableDictionary *sanitizedLabels; - NSArray *allKeys, *accounts; NSDictionary *newLabels; NSString *name; int i; @@ -2115,6 +2115,11 @@ static NSArray *reminderValues = nil; [v setObject: sanitizedLabels forKey: @"SOGoMailLabelsColors"]; } + + // We sanitize our autoreply email addresses + addresses = [NSArray arrayWithArray: [[[[v objectForKey: @"Vacation"] objectForKey: @"autoReplyEmailAddresses"] + componentsSeparatedByString: @","] trimmedComponents]]; + [[v objectForKey: @"Vacation"] setObject: addresses forKey: @"autoReplyEmailAddresses"]; // We sanitize our auxilary mail accounts accounts = [v objectForKey: @"AuxiliaryMailAccounts"];