mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-10-23 06:55:45 +07:00
node_modules: update (#352)
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
1 parent
4026a70a6b
commit
47af4a10b5
53 files changed
+630
-217
No files matched your search
+2
-4
@@ -198,16 +198,14 @@ class Cookies {
|
||||
// check if hostname matches
|
||||
// .foo.com also matches subdomains, foo.com does not
|
||||
if (urlparts.hostname !== cookie.domain &&
|
||||
(cookie.domain.charAt(0) !== '.' ||
|
||||
('.' + urlparts.hostname).substr(-cookie.domain.length) !== cookie.domain)) {
|
||||
(cookie.domain.charAt(0) !== '.' || ('.' + urlparts.hostname).substr(-cookie.domain.length) !== cookie.domain)) {
|
||||
return false;
|
||||
}
|
||||
// check if the request path path-matches the cookie path (RFC 6265 section 5.1.4):
|
||||
// identical paths match, otherwise the cookie path must be a directory prefix
|
||||
const pathname = urlparts.pathname || '/';
|
||||
const cookiePath = cookie.path;
|
||||
const pathMatches = pathname === cookiePath ||
|
||||
(pathname.startsWith(cookiePath) && (cookiePath.endsWith('/') || pathname.charAt(cookiePath.length) === '/'));
|
||||
const pathMatches = pathname === cookiePath || (pathname.startsWith(cookiePath) && (cookiePath.endsWith('/') || pathname.charAt(cookiePath.length) === '/'));
|
||||
if (!pathMatches) {
|
||||
return false;
|
||||
}
|
||||
|
||||
+2
-8
@@ -262,11 +262,7 @@ function nmfetch(url, options) {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (parsed.protocol === 'https:' &&
|
||||
parsed.hostname &&
|
||||
parsed.hostname !== reqOptions.host &&
|
||||
!node_net_1.default.isIP(parsed.hostname) &&
|
||||
!reqOptions.servername) {
|
||||
if (parsed.protocol === 'https:' && parsed.hostname && parsed.hostname !== reqOptions.host && !node_net_1.default.isIP(parsed.hostname) && !reqOptions.servername) {
|
||||
reqOptions.servername = parsed.hostname;
|
||||
}
|
||||
try {
|
||||
@@ -369,9 +365,7 @@ function nmfetch(url, options) {
|
||||
// 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);
|
||||
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 => {
|
||||
|
||||
Reference in new issue
Block a user