node_modules: update (#355)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurlaanddawidd6 authored and GitHub committed 2026-10-29 12:25:35 +01:00
1 parent b6d53adeaf
commit f8b8145a29
34 files changed
+375 -36

No files matched your search

+15 -4
View File
@@ -654,15 +654,18 @@ class MimeNode {
return;
}
switch (header.key) {
// The comments of a MIME header are not part of its value and are dropped, so a
// caller supplied 'boundary=b (comment)' is the boundary b it names, and the
// header goes out without the comment
case 'Content-Disposition':
structured = mimeFuncs.parseHeaderValue(value);
structured = mimeFuncs.parseHeaderValue(value, { stripComments: true });
if (this.filename) {
structured.params.filename = this.filename;
}
value = mimeFuncs.buildHeaderValue(structured);
break;
case 'Content-Type':
structured = mimeFuncs.parseHeaderValue(value);
structured = mimeFuncs.parseHeaderValue(value, { stripComments: true });
// the type token decides multipart and charset below, so clean it before
// those run and not just on the way out, otherwise a control char makes
// the checks miss and the header ends up claiming a type it is not set up for
@@ -1299,7 +1302,7 @@ class MimeNode {
.replace(/[\s\x00-\x20\x7f:]/g, '')
.toLowerCase()
// use uppercase words, except MIME
.replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi, c => c.toUpperCase())
.replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^OTP(?=-Token$)|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi, c => c.toUpperCase())
// special case
.replace(/^Content-Features$/i, 'Content-features');
return key;
@@ -1371,7 +1374,7 @@ class MimeNode {
// values enclosed in <>
case 'Message-ID':
case 'In-Reply-To':
case 'Content-Id':
case 'Content-ID':
// a msg-id is structured, so an encoded word inside the angle brackets would
// be read as literal text. drop the characters that can not appear in a header
// at all, but leave HT alone, it separates the ids of a multi id value
@@ -1386,6 +1389,14 @@ class MimeNode {
value = value + '>';
}
return value;
// a structured field (RFC 9651) that can not be mime encoded, an encoded word would
// turn its quoted strings into text that no structured field parser reads. Only
// the characters that can not appear in a header at all are removed
case 'OTP-Token':
return (value || '')
.toString()
.replace(/\r?\n|\r/g, ' ')
.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g, '');
// space separated list of values enclosed in <>
case 'References': {
const ids = [];