@bobfrankston/iflow-direct 0.1.48 → 0.1.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/imap-protocol.js +10 -0
- package/package.json +1 -1
package/imap-protocol.js
CHANGED
|
@@ -422,6 +422,16 @@ function tokenizeParenList(s) {
|
|
|
422
422
|
let j = i;
|
|
423
423
|
while (j < end && str[j] !== " " && str[j] !== ")" && str[j] !== "(")
|
|
424
424
|
j++;
|
|
425
|
+
if (j === i) {
|
|
426
|
+
// str[i] is a stray ')' (or '(') that none of the branches
|
|
427
|
+
// above consumed — an unbalanced/malformed parenthesised
|
|
428
|
+
// list (Dovecot mis-parses some Outlook `From:` headers and
|
|
429
|
+
// emits exactly this). Without advancing, `i` is stuck and
|
|
430
|
+
// the while-loop spins FOREVER, pinning a CPU core and
|
|
431
|
+
// wedging the whole daemon event loop. Skip the stray char.
|
|
432
|
+
i++;
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
425
435
|
tokens.push(str.substring(i, j));
|
|
426
436
|
i = j;
|
|
427
437
|
}
|