From f1c59a746825bf33e10ce51e1324d765b6581b64 Mon Sep 17 00:00:00 2001 From: mscdex Date: Tue, 9 Apr 2013 12:41:00 -0400 Subject: [PATCH] adjust untagged response regexp to allow for text code only --- lib/imap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/imap.js b/lib/imap.js index 1520048..afbd9f0 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -23,7 +23,7 @@ var CRLF = '\r\n', BOXSELECTED: 4 }, RE_LITHEADER = /(?:((?:BODY\[.*\](?:<\d+>)?)?|[^ ]+) )?\{(\d+)\}$/i, - RE_UNRESP = /^\* (OK|PREAUTH|NO|BAD)(?:\r\n| (?:\[(.+)\] )?(.+))$/i, + RE_UNRESP = /^\* (OK|PREAUTH|NO|BAD)(?:\r\n|(?: \[(.+?)\])?(?: (.+))?)$/i, RE_TAGGED_RESP = /^A\d+ (OK|NO|BAD) (?:\[(.+?)\] )?(.+)$/i, RE_TEXT_CODE = /([^ ]+)(?: (.*))?$/, RE_RES_IDLE = /^IDLE /i,