node_modules: update (#347)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurlaanddawidd6 authored and GitHub committed 2026-10-14 12:50:45 +02:00
1 parent 16c91eb93f
commit f6664f2182
10 files changed
+155 -60

No files matched your search

+16 -10
View File
@@ -78,6 +78,10 @@ function parseFetchUrl(url) {
}
return parsed;
}
// the port a request to the URL goes to, explicit or the default of its scheme
function fetchPort(parsed) {
return parsed.port ? Number(parsed.port) : parsed.protocol === 'https:' ? 443 : 80;
}
function nmfetch(url, options) {
options = options || {};
options.fetchRes = options.fetchRes || new PassThrough();
@@ -194,7 +198,7 @@ function nmfetch(url, options) {
method,
host: parsed.hostname,
path: parsed.path,
port: parsed.port ? parsed.port : parsed.protocol === 'https:' ? 443 : 80,
port: fetchPort(parsed),
headers,
// Validate TLS certificates by default. Callers that genuinely need to
// reach a self-signed/internal host opt out explicitly with
@@ -296,17 +300,19 @@ function nmfetch(url, options) {
// the shared fetchRes once it times out. Callers listen with req.once().
return fail(new Error('Unsupported protocol for URL ' + redirectUrl), redirectUrl);
}
// Do not forward credentials when the redirect leaves the original
// security context: a different host, or a downgrade from https to
// http (which would otherwise put them on the wire in cleartext).
// Strip sensitive request headers so an attacker who controls the
// redirect target cannot harvest them.
const crossHost = redirectParsed.hostname !== parsed.hostname;
const downgrade = parsed.protocol === 'https:' && redirectParsed.protocol === 'http:';
if (options.headers && (crossHost || downgrade)) {
// Do not forward credentials when the redirect leaves the origin: a different
// scheme, host or port is a different security context (an https to http
// downgrade would also put them on the wire in cleartext). Strip sensitive
// request headers so an attacker who controls the redirect target cannot
// harvest them.
const crossOrigin = redirectParsed.protocol !== parsed.protocol ||
redirectParsed.hostname !== parsed.hostname ||
fetchPort(redirectParsed) !== fetchPort(parsed);
if (options.headers && crossOrigin) {
const sensitive = ['authorization', 'cookie', 'proxy-authorization'];
Object.keys(options.headers).forEach(key => {
if (sensitive.includes(key.toLowerCase())) {
// normalized the way the request headers are built above, a padded name is sent too
if (sensitive.includes(key.toLowerCase().trim())) {
delete options.headers[key];
}
});
+1 -1
View File
@@ -1,3 +1,3 @@
export declare const name = "nodemailer";
export declare const version = "10.1.0";
export declare const version = "10.1.1";
export declare const homepage = "https://nodemailer.com/";
+1 -1
View File
@@ -1,4 +1,4 @@
// Generated by scripts/build.js from package.json. Do not edit by hand.
export const name = 'nodemailer';
export const version = '10.1.0';
export const version = '10.1.1';
export const homepage = 'https://nodemailer.com/';