mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-10-31 01:38:34 +07:00
node_modules: update (#355)
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
1 parent
b6d53adeaf
commit
f8b8145a29
34 files changed
+375
-36
No files matched your search
+15
-4
@@ -616,15 +616,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
|
||||
@@ -1261,7 +1264,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;
|
||||
@@ -1333,7 +1336,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
|
||||
@@ -1348,6 +1351,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 = [];
|
||||
|
||||
Reference in new issue
Block a user