Sanitize value of SOGoMailAutoSave

This commit is contained in:
Francis Lachapelle
2019-09-25 10:36:31 -04:00
parent 5c3bff74a0
commit 2fbe721c60
3 changed files with 12 additions and 4 deletions
+1
View File
@@ -8,6 +8,7 @@ Bug fixes
- sogo-tool manage-acl not working on v2 (#4292)
- [web] restored mail threads state of inbox on initial page load
- [web] fixed and improved messages list in threads mode
- [web] sanitize value of draft auto save timer, defaults to 5 minutes
2.3.23 (2017-10-18)
-------------------
+10 -3
View File
@@ -372,7 +372,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
userLanguage = [source objectForKey: @"SOGoLanguage"];
if (!(userLanguage && [userLanguage isKindOfClass: [NSString class]]))
userLanguage = [(SOGoDomainDefaults *) parentSource language];
supportedLanguages = [[SOGoSystemDefaults sharedSystemDefaults]
supportedLanguages];
@@ -541,7 +541,14 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
- (void) setMailAutoSave: (NSString *) newValue
{
[self setObject: newValue forKey: @"SOGoMailAutoSave"];
NSString *s;
if ([newValue intValue] == 0)
s = @"5";
else
s = newValue;
[self setObject: s forKey: @"SOGoMailAutoSave"];
}
- (NSString *) mailAutoSave
@@ -552,7 +559,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
if ([s intValue] == 0)
s = @"5";
return s;
}
+1 -1
View File
@@ -384,7 +384,7 @@ function initAddresses() {
}
function initAutoSaveTimer() {
var autoSave = UserDefaults["SOGoMailAutoSave"];
var autoSave = parseInt(UserDefaults["SOGoMailAutoSave"]) || 5;
if (autoSave) {
var interval;