Skip to content

Commit 53e220a

Browse files
authored
fix(RFC5987-filename): ZMS-14: Allow RFC5987 encoded filenames (filename*=charset'language'text) (#993)
* ZMS-14: Allow RFC5987 encoded filenames (filename*=charset'language'text)
1 parent dfeee86 commit 53e220a

File tree

2 files changed

+429
-1
lines changed

2 files changed

+429
-1
lines changed

imap-core/lib/indexer/parse-mime-tree.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ class MIMEParser {
309309
if (!processEncodedWords[match[1]]) {
310310
processEncodedWords[match[1]] = [];
311311

312-
if (key.match(/^([^*]+)\*(\d)?\*$/)) {
312+
// Additionally allow RFC5987 section 3.2.1 encoded values
313+
if (key.match(/^([^*]+)\*(?:\d+\*)?$/)) {
313314
// must have charset
314315
charsetRequired.add(processEncodedWords[match[1]]);
315316
}

0 commit comments

Comments
 (0)