Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
(js) Fix sanitisation of flags in Sieve filters
Fixes #4087
  • Loading branch information
cgx committed Mar 22, 2017
1 parent 5ff8463 commit e7a06c4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -25,6 +25,7 @@ Bug fixes
- [web] fixed saving draft outside Mail module (#4071)
- [web] fixed SCAYT automatic language selection in HTML editor
- [web] fixed task sorting on multiple categories
- [web] fixed sanitisation of flags in Sieve filters (#4087)
- [eas] fixed opacity in EAS freebusy (#4033)

3.2.7 (2017-02-14)
Expand Down
19 changes: 17 additions & 2 deletions UI/WebServerResources/js/Preferences/Preferences.service.js
Expand Up @@ -22,9 +22,16 @@
return ['_' + key, value];
return [key, value];
}));

data.SOGoMailLabelsColors = labels;

_.forEach(data.SOGoSieveFilters, function(filter) {
_.forEach(filter.actions, function(action) {
if (action.method == 'addflag' &&
action.argument.charAt(0) == '$')
action.argument = '_' + action.argument;
});
});

if (data.SOGoRememberLastModule)
data.SOGoLoginModule = "Last";

Expand Down Expand Up @@ -260,9 +267,17 @@
}
return [key, value];
}));

preferences.defaults.SOGoMailLabelsColors = labels;

_.forEach(preferences.defaults.SOGoSieveFilters, function(filter) {
_.forEach(filter.actions, function(action) {
if (action.method == 'addflag' &&
action.argument.charAt(0) == '_' &&
action.argument.charAt(1) == '$')
action.argument = action.argument.substring(1);
});
});

if (!preferences.defaults.SOGoMailComposeFontSizeEnabled)
preferences.defaults.SOGoMailComposeFontSize = 0;
delete preferences.defaults.SOGoMailComposeFontSizeEnabled;
Expand Down

0 comments on commit e7a06c4

Please sign in to comment.