node_modules: update

This commit is contained in:
Dawid Dziurla
2020-11-12 16:30:46 +01:00
parent 2b66ab09bf
commit 6fd4a30225
20 changed files with 168 additions and 81 deletions

17
node_modules/nodemailer/CHANGELOG.md generated vendored
View File

@ -1,5 +1,22 @@
# CHANGELOG
## 6.4.15 2020-11-06
- Minor changes in header key casing
## 6.4.14 2020-10-14
- Disabled postinstall script
## 6.4.13 2020-10-02
- Fix normalizeHeaderKey method for single node messages
## 6.4.12 2020-09-30
- Better handling of attachment filenames that include quote symbols
- Includes all information from the oath2 error response in the error message (Normal Gaussian) [1787f227]
## 6.4.11 2020-07-29
- Fixed escape sequence handling in address parsing

View File

@ -470,7 +470,8 @@ class MailComposer {
textEncoding: this.mail.textEncoding,
boundaryPrefix: this.mail.boundaryPrefix,
disableUrlAccess: this.mail.disableUrlAccess,
disableFileAccess: this.mail.disableFileAccess
disableFileAccess: this.mail.disableFileAccess,
normalizeHeaderKey: this.mail.normalizeHeaderKey
});
} else {
node = parentNode.createChild(element.contentType, {

View File

@ -13,8 +13,9 @@ module.exports = {
* @param {String} value String to be tested
* @returns {Boolean} true if it is a plaintext string
*/
isPlainText(value) {
if (typeof value !== 'string' || /[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/.test(value)) {
isPlainText(value, isParam) {
const re = isParam ? /[\x00-\x08\x0b\x0c\x0e-\x1f"\u0080-\uFFFF]/ : /[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/;
if (typeof value !== 'string' || re.test(value)) {
return false;
} else {
return true;
@ -49,11 +50,7 @@ module.exports = {
* @return {String} Single or several mime words joined together
*/
encodeWord(data, mimeWordEncoding, maxLength) {
mimeWordEncoding = (mimeWordEncoding || 'Q')
.toString()
.toUpperCase()
.trim()
.charAt(0);
mimeWordEncoding = (mimeWordEncoding || 'Q').toString().toUpperCase().trim().charAt(0);
maxLength = maxLength || 0;
let encodedStr;
@ -66,10 +63,7 @@ module.exports = {
if (mimeWordEncoding === 'Q') {
// https://tools.ietf.org/html/rfc2047#section-5 rule (3)
encodedStr = qp.encode(data).replace(/[^a-z0-9!*+\-/=]/gi, chr => {
let ord = chr
.charCodeAt(0)
.toString(16)
.toUpperCase();
let ord = chr.charCodeAt(0).toString(16).toUpperCase();
if (chr === ' ') {
return '_';
} else {
@ -131,8 +125,8 @@ module.exports = {
let encodedValue;
// find first word with a non-printable ascii in it
let firstMatch = value.match(/(?:^|\s)([^\s]*[\u0080-\uFFFF])/);
// find first word with a non-printable ascii or special symbol in it
let firstMatch = value.match(/(?:^|\s)([^\s]*["\u0080-\uFFFF])/);
if (!firstMatch) {
return value;
}
@ -144,7 +138,7 @@ module.exports = {
}
// find the last word with a non-printable ascii in it
let lastMatch = value.match(/([\u0080-\uFFFF][^\s]*)[^\u0080-\uFFFF]*$/);
let lastMatch = value.match(/(["\u0080-\uFFFF][^\s]*)[^"\u0080-\uFFFF]*$/);
if (!lastMatch) {
// should not happen
return value;
@ -181,7 +175,7 @@ module.exports = {
// filename might include unicode characters so it is a special case
// other values probably do not
let value = structured.params[param];
if (!this.isPlainText(value) || value.length >= 75) {
if (!this.isPlainText(value, true) || value.length >= 75) {
this.buildHeaderParam(param, value, 50).forEach(encodedParam => {
if (!/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(encodedParam.value) || encodedParam.key.substr(-1) === '*') {
paramsArray.push(encodedParam.key + '=' + encodedParam.value);
@ -226,7 +220,7 @@ module.exports = {
maxLength = maxLength || 50;
// process ascii only text
if (this.isPlainText(data)) {
if (this.isPlainText(data, true)) {
// check if conversion is even needed
if (encodedStr.length <= maxLength) {
return [
@ -591,10 +585,7 @@ module.exports = {
encodeURICharComponent: chr => {
let res = '';
let ord = chr
.charCodeAt(0)
.toString(16)
.toUpperCase();
let ord = chr.charCodeAt(0).toString(16).toUpperCase();
if (ord.length % 2) {
ord = '0' + ord;

View File

@ -530,6 +530,7 @@ class MimeNode {
}
value = mimeFuncs.buildHeaderValue(structured);
break;
case 'Content-Type':
structured = mimeFuncs.parseHeaderValue(value);
@ -554,6 +555,7 @@ class MimeNode {
value += '; name=' + param;
}
break;
case 'Bcc':
if (!this.keepBcc) {
// skip BCC values
@ -997,7 +999,7 @@ class MimeNode {
.trim()
.toLowerCase()
// use uppercase words, except MIME
.replace(/^X-SMTPAPI$|^(MIME|DKIM)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi, c => c.toUpperCase())
.replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi, c => c.toUpperCase())
// special case
.replace(/^Content-Features$/i, 'Content-features');
@ -1099,6 +1101,11 @@ class MimeNode {
value = (value || '').toString().replace(/\r?\n|\r/g, ' ');
return this._encodeWords(value);
case 'Content-Type':
case 'Content-Disposition':
// if it includes a filename then it is already encoded
return (value || '').toString().replace(/\r?\n|\r/g, ' ');
default:
value = (value || '').toString().replace(/\r?\n|\r/g, ' ');
// encodeWords only encodes if needed, otherwise the original string is returned

View File

@ -38,7 +38,7 @@ class SESTransport extends EventEmitter {
// max messages per second
this.sendingRate = Number(this.options.sendingRate) || Infinity;
this.sendingRateTTL = null;
this.rateInterval = 1000;
this.rateInterval = 1000; // milliseconds
this.rateMessages = [];
this.pending = [];

View File

@ -22,6 +22,12 @@
"host": "smtp.dynect.net",
"port": 25
},
"Ethereal": {
"aliases": ["ethereal.email"],
"host": "smtp.ethereal.email",
"port": 587
},
"FastMail": {
"domains": ["fastmail.fm"],

View File

@ -261,7 +261,15 @@ class XOAuth2 extends Stream {
);
if (data.error) {
return callback(new Error(data.error));
// Error Response : https://tools.ietf.org/html/rfc6749#section-5.2
let errorMessage = data.error;
if(data.error_description) {
errorMessage += ': ' + data.error_description;
}
if(data.error_uri) {
errorMessage += ' (' + data.error_uri + ')';
}
return callback(new Error(errorMessage));
}
if (data.access_token) {

37
node_modules/nodemailer/package.json generated vendored
View File

@ -1,27 +1,31 @@
{
"_from": "nodemailer@6.4.11",
"_id": "nodemailer@6.4.11",
"_args": [
[
"nodemailer@6.4.15",
"/home/dawidd6/github/dawidd6/action-send-mail"
]
],
"_from": "nodemailer@6.4.15",
"_id": "nodemailer@6.4.15",
"_inBundle": false,
"_integrity": "sha512-BVZBDi+aJV4O38rxsUh164Dk1NCqgh6Cm0rQSb9SK/DHGll/DrCMnycVDD7msJgZCnmVa8ASo8EZzR7jsgTukQ==",
"_integrity": "sha512-2/z13dBTWdgTRlxVMAK6C13dCI22GEShET4+jFLlQsxpblxYhojnucfcTZO1QBu5CsHvABsBj2JCGO3vl0HSQA==",
"_location": "/nodemailer",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "nodemailer@6.4.11",
"raw": "nodemailer@6.4.15",
"name": "nodemailer",
"escapedName": "nodemailer",
"rawSpec": "6.4.11",
"rawSpec": "6.4.15",
"saveSpec": null,
"fetchSpec": "6.4.11"
"fetchSpec": "6.4.15"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.11.tgz",
"_shasum": "1f00b4ffd106403f17c03f3d43d5945b2677046c",
"_spec": "nodemailer@6.4.11",
"_resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.15.tgz",
"_spec": "6.4.15",
"_where": "/home/dawidd6/github/dawidd6/action-send-mail",
"author": {
"name": "Andris Reinman"
@ -29,27 +33,25 @@
"bugs": {
"url": "https://github.com/nodemailer/nodemailer/issues"
},
"bundleDependencies": false,
"dependencies": {},
"deprecated": false,
"description": "Easy as cake e-mail sending from your Node.js applications",
"devDependencies": {
"bunyan": "1.8.14",
"chai": "4.2.0",
"eslint-config-nodemailer": "1.2.0",
"eslint-config-prettier": "6.11.0",
"grunt": "1.2.1",
"eslint-config-prettier": "6.15.0",
"grunt": "1.3.0",
"grunt-cli": "1.3.2",
"grunt-eslint": "23.0.0",
"grunt-mocha-test": "0.13.3",
"libbase64": "1.2.1",
"libmime": "5.0.0",
"libqp": "1.1.0",
"mocha": "8.0.1",
"mocha": "8.2.1",
"nodemailer-ntlm-auth": "1.0.1",
"proxy": "1.0.2",
"proxy-test-server": "1.0.0",
"sinon": "9.0.2",
"sinon": "9.2.1",
"smtp-server": "3.7.0"
},
"engines": {
@ -67,8 +69,7 @@
"url": "git+https://github.com/nodemailer/nodemailer.git"
},
"scripts": {
"postinstall": "node -e \"try{require('./postinstall')}catch(e){}\"",
"test": "grunt"
},
"version": "6.4.11"
"version": "6.4.15"
}