Connection: drop restrictive flag check for addFlags()

fork
mscdex 11 years ago
parent 3feafdc25d
commit 1c5f756056

@ -473,13 +473,8 @@ Connection.prototype._store = function(which, uids, flags, isAdding, cb) {
flags = [flags];
for (var i = 0, len = flags.length; i < len; ++i) {
if (!isKeywords) {
if (flags[i][0] === '\\')
flags[i] = flags[i].substr(1);
if (this._box.permFlags.indexOf(flags[i].toLowerCase()) === -1
|| flags[i] === '*')
throw new Error('The flag "' + flags[i]
+ '" is not allowed by the server for this mailbox');
flags[i] = '\\' + flags[i];
if (flags[i][0] !== '\\')
flags[i] = '\\' + flags[i];
} else {
// keyword contains any char except control characters (%x00-1F and %x7F)
// and: '(', ')', '{', ' ', '%', '*', '\', '"', ']'

Loading…
Cancel
Save