mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-11-22 05:25:29 +07:00
node_modules: update
This commit is contained in:
1 parent
0989b5499d
commit
a20949df3b
21 files changed
+129
-34
No files matched your search
+3
-2
@@ -62,12 +62,13 @@ function unsupportedHashAlgoError(hashAlgo) {
|
||||
*/
|
||||
function sign(headers, hashAlgo, bodyHash, options) {
|
||||
options = options || {};
|
||||
// all listed fields from RFC4871 #5.5
|
||||
// all listed fields from RFC4871 #5.5, plus List-Unsubscribe-Post: RFC 8058 only allows
|
||||
// one-click unsubscribe when the signature covers it next to List-Unsubscribe
|
||||
const defaultFieldNames = 'From:Sender:Reply-To:Subject:Date:Message-ID:To:' +
|
||||
'Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:' +
|
||||
'Content-Description:Resent-Date:Resent-From:Resent-Sender:' +
|
||||
'Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:' +
|
||||
'List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:' +
|
||||
'List-Id:List-Help:List-Unsubscribe:List-Unsubscribe-Post:List-Subscribe:List-Post:' +
|
||||
'List-Owner:List-Archive:OTP-Token';
|
||||
const fieldNames = options.headerFieldNames || defaultFieldNames;
|
||||
const canonicalizedHeaderData = relaxedHeaders(headers, fieldNames, options.skipFields);
|
||||
|
||||
+3
-1
@@ -71,7 +71,9 @@ declare class Cookies {
|
||||
*/
|
||||
add(cookie: Cookie): boolean;
|
||||
/**
|
||||
* Checks if two cookie objects are the same
|
||||
* Checks if two cookie objects are the same cookie. A cookie is identified by its
|
||||
* name, domain and path (RFC 6265 section 5.3), the Secure and HttpOnly flags are
|
||||
* attributes of the stored cookie that an update replaces
|
||||
*
|
||||
* @param a Cookie to check against
|
||||
* @param b Cookie to check against
|
||||
|
||||
+12
-3
@@ -89,6 +89,10 @@ class Cookies {
|
||||
if (!cookie.expires) {
|
||||
cookie.expires = new Date(Date.now() + (Number(this.options.sessionTimeout || SESSION_TIMEOUT) || SESSION_TIMEOUT) * 1000);
|
||||
}
|
||||
// a non-secure url can not set a Secure cookie, nor overwrite or delete one (RFC 6265bis section 5.7)
|
||||
if (urlparts.protocol !== 'https:' && (cookie.secure || this.cookies.some(stored => stored.secure && this.compare(stored, cookie)))) {
|
||||
return false;
|
||||
}
|
||||
return this.add(cookie);
|
||||
}
|
||||
/**
|
||||
@@ -131,6 +135,7 @@ class Cookies {
|
||||
parse(cookieStr) {
|
||||
const cookie = {};
|
||||
let hasNameValue = false;
|
||||
let hasMaxAge = false;
|
||||
(cookieStr || '')
|
||||
.toString()
|
||||
.split(';')
|
||||
@@ -158,7 +163,8 @@ class Cookies {
|
||||
case 'expires': {
|
||||
const expires = new Date(value);
|
||||
// ignore date if can not parse it
|
||||
if (expires.toString() !== 'Invalid Date') {
|
||||
if (expires.toString() !== 'Invalid Date' && !hasMaxAge) {
|
||||
// Max-Age has precedence when both attributes are present (RFC 6265 5.3)
|
||||
cookie.expires = expires;
|
||||
}
|
||||
break;
|
||||
@@ -175,6 +181,7 @@ class Cookies {
|
||||
break;
|
||||
case 'max-age':
|
||||
cookie.expires = new Date(Date.now() + (Number(value) || 0) * 1000);
|
||||
hasMaxAge = true;
|
||||
break;
|
||||
case 'secure':
|
||||
cookie.secure = true;
|
||||
@@ -244,14 +251,16 @@ class Cookies {
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Checks if two cookie objects are the same
|
||||
* Checks if two cookie objects are the same cookie. A cookie is identified by its
|
||||
* name, domain and path (RFC 6265 section 5.3), the Secure and HttpOnly flags are
|
||||
* attributes of the stored cookie that an update replaces
|
||||
*
|
||||
* @param a Cookie to check against
|
||||
* @param b Cookie to check against
|
||||
* @returns True, if the cookies are the same
|
||||
*/
|
||||
compare(a, b) {
|
||||
return a.name === b.name && a.path === b.path && a.domain === b.domain && a.secure === b.secure && a.httponly === b.httponly;
|
||||
return a.name === b.name && a.path === b.path && a.domain === b.domain;
|
||||
}
|
||||
/**
|
||||
* Checks if a cookie is expired
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
export declare const name = "nodemailer";
|
||||
export declare const version = "10.5.0";
|
||||
export declare const version = "10.6.1";
|
||||
export declare const homepage = "https://nodemailer.com/";
|
||||
+1
-1
@@ -3,5 +3,5 @@
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.homepage = exports.version = exports.name = void 0;
|
||||
exports.name = 'nodemailer';
|
||||
exports.version = '10.5.0';
|
||||
exports.version = '10.6.1';
|
||||
exports.homepage = 'https://nodemailer.com/';
|
||||
+3
@@ -42,6 +42,8 @@ export interface SMTPConnectionOptions {
|
||||
greetingTimeout?: number | undefined;
|
||||
/** Time of inactivity in ms until the connection is closed, defaults to 10 minutes */
|
||||
socketTimeout?: number | undefined;
|
||||
/** Time in ms to wait for the peer to close after ending the socket, defaults to 5 seconds. Set to 0 to destroy it immediately */
|
||||
socketCloseTimeout?: number | undefined;
|
||||
/** Largest single server response to accept in bytes, defaults to 1 MB */
|
||||
maxResponseSize?: number | undefined;
|
||||
/** Time to wait in ms for the DNS requests to be resolved, defaults to 30 seconds */
|
||||
@@ -307,6 +309,7 @@ export type SMTPConnectionResponseAction = (str: string) => void;
|
||||
* * **greetingTimeout** - Time to wait in ms until greeting message is received from the server (defaults to 30 seconds)
|
||||
* * **connectionTimeout** - how many milliseconds to wait for the connection to establish (defaults to 2 minutes)
|
||||
* * **socketTimeout** - Time of inactivity until the connection is closed (defaults to 10 minutes)
|
||||
* * **socketCloseTimeout** - Time in ms to wait for the peer to close after ending the socket (defaults to 5 seconds, 0 destroys immediately)
|
||||
* * **maxResponseSize** - Largest single server response to accept in bytes (defaults to 1 MB)
|
||||
* * **dnsTimeout** - Time to wait in ms for the DNS requests to be resolved (defaults to 30 seconds)
|
||||
* * **lmtp** - if true, uses LMTP instead of SMTP protocol
|
||||
|
||||
+11
-3
@@ -145,6 +145,7 @@ function maskAuthCommand(cmd) {
|
||||
* * **greetingTimeout** - Time to wait in ms until greeting message is received from the server (defaults to 30 seconds)
|
||||
* * **connectionTimeout** - how many milliseconds to wait for the connection to establish (defaults to 2 minutes)
|
||||
* * **socketTimeout** - Time of inactivity until the connection is closed (defaults to 10 minutes)
|
||||
* * **socketCloseTimeout** - Time in ms to wait for the peer to close after ending the socket (defaults to 5 seconds, 0 destroys immediately)
|
||||
* * **maxResponseSize** - Largest single server response to accept in bytes (defaults to 1 MB)
|
||||
* * **dnsTimeout** - Time to wait in ms for the DNS requests to be resolved (defaults to 30 seconds)
|
||||
* * **lmtp** - if true, uses LMTP instead of SMTP protocol
|
||||
@@ -468,11 +469,18 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
||||
return;
|
||||
}
|
||||
this._closing = true;
|
||||
const closeMethod = this.stage === 'init' ? 'destroy' : 'end';
|
||||
// anything but a non-negative finite number keeps the default grace period
|
||||
const configuredCloseTimeout = this.options.socketCloseTimeout;
|
||||
const socketCloseTimeout = typeof configuredCloseTimeout === 'number' && Number.isFinite(configuredCloseTimeout) && configuredCloseTimeout >= 0
|
||||
? configuredCloseTimeout
|
||||
: CLOSE_TIMEOUT;
|
||||
const closeMethod = this.stage === 'init' || socketCloseTimeout === 0 ? 'destroy' : 'end';
|
||||
this.logger.debug({
|
||||
tnx: 'smtp'
|
||||
}, 'Closing connection to the server using "%s"', closeMethod);
|
||||
const socket = (this._socket && this._socket.socket) || this._socket;
|
||||
// after STARTTLS this is the TLS socket, tear that one down and not the plain socket it
|
||||
// wraps (Node 27 exposes the wrapped socket as `.socket`)
|
||||
const socket = this._socket;
|
||||
// Detach any in-flight DATA stream from the socket so the source stream
|
||||
// can be garbage-collected once the socket is gone.
|
||||
if (this._currentDataStream) {
|
||||
@@ -514,7 +522,7 @@ class SMTPConnection extends node_events_1.EventEmitter {
|
||||
if (closeMethod === 'end') {
|
||||
// end() only closes our side, a server that never closes its own would keep
|
||||
// the socket, and the process with it, around for good
|
||||
const closeTimer = setTimeout(() => socket.destroy(), CLOSE_TIMEOUT);
|
||||
const closeTimer = setTimeout(() => socket.destroy(), socketCloseTimeout);
|
||||
if (typeof closeTimer.unref === 'function') {
|
||||
closeTimer.unref();
|
||||
}
|
||||
|
||||
+6
@@ -463,6 +463,12 @@ exports.services = {
|
||||
"host": "smtp-relay.brevo.com",
|
||||
"port": 587
|
||||
},
|
||||
"Sendora": {
|
||||
"description": "Sendora",
|
||||
"host": "smtp.sendora.se",
|
||||
"port": 465,
|
||||
"secure": true
|
||||
},
|
||||
"SendPulse": {
|
||||
"description": "SendPulse",
|
||||
"host": "smtp-pulse.com",
|
||||
|
||||
Reference in new issue
Block a user