mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 03:15:25 +00:00
fix(preferences(js)): sanitize mail identities when saving
This commit is contained in:
@@ -1504,7 +1504,7 @@ static NSArray *reminderValues = nil;
|
||||
[v setObject: [[user userDefaults] mailCertificate] forKey: @"SOGoMailCertificate"];
|
||||
|
||||
//
|
||||
// We sanitize our auxilary mail accounts
|
||||
// We sanitize our auxiliary mail accounts
|
||||
//
|
||||
accounts = [v objectForKey: @"AuxiliaryMailAccounts"];
|
||||
if (accounts && [accounts isKindOfClass: [NSArray class]])
|
||||
|
||||
@@ -687,6 +687,16 @@
|
||||
});
|
||||
});
|
||||
|
||||
// See Account.prototype.$omit
|
||||
_.forEach(preferences.defaults.AuxiliaryMailAccounts, function (account) {
|
||||
var identities = [];
|
||||
_.forEach(account.identities, function (identity) {
|
||||
if (!identity.isReadOnly)
|
||||
identities.push(_.pick(identity, ['email', 'fullName', 'replyTo', 'signature', 'isDefault']));
|
||||
});
|
||||
account.identities = identities;
|
||||
});
|
||||
|
||||
if (!preferences.defaults.SOGoMailComposeWindowEnabled)
|
||||
delete preferences.defaults.SOGoMailComposeWindow;
|
||||
delete preferences.defaults.SOGoMailComposeWindowEnabled;
|
||||
|
||||
Reference in New Issue
Block a user