From 1c5f756056c01dd7571b5dd9aba6924920ee84b1 Mon Sep 17 00:00:00 2001 From: mscdex Date: Thu, 4 Jul 2013 23:48:21 -0400 Subject: [PATCH] Connection: drop restrictive flag check for addFlags() --- lib/Connection.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/Connection.js b/lib/Connection.js index 2aa7e15..537f6be 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -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: '(', ')', '{', ' ', '%', '*', '\', '"', ']'