From d7366a9202e1f2b8487d8bfcb62d7e247e2c6ee8 Mon Sep 17 00:00:00 2001 From: mscdex Date: Tue, 12 Feb 2013 04:43:59 -0500 Subject: [PATCH] fix parsing resp-text-code on tagged error responses --- lib/imap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/imap.js b/lib/imap.js index be6f87e..aa3c535 100644 --- a/lib/imap.js +++ b/lib/imap.js @@ -650,7 +650,7 @@ ImapConnection.prototype.connect = function(loginCb) { err.request = cmdstr; } else return requests[0].callback(); - } else if (m = /^A\d+ (NO|BAD) (?:\[(.+)\] )?(.+)$/i.exec(line)) { + } else if (m = /^A\d+ (NO|BAD) (?:\[(.+?)\] )?(.+)$/i.exec(line)) { // m[1]: error type // m[2]: resp-text-code // m[3]: message