From 7182f62f73e2143c39dab387123927b4d3e41038 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Oct 2026 00:26:23 +0000 Subject: [PATCH 1/2] fix: apply audit fixes --- dist/index.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index b5b75ea..b6efec1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8140,7 +8140,16 @@ RedirectableRequest.prototype._sanitizeOptions = function (options) { if (!options.headers) { options.headers = {}; } - if (!isArray(options.sensitiveHeaders)) { + // Convert [header1, value1, header2, value2, …] to object + else if (Array.isArray(options.headers)) { + var headerList = options.headers; + options.headers = {}; + for (var i = 0; i < headerList.length; i += 2) { + options.headers[headerList[i]] = headerList[i + 1]; + } + } + // Ensure sensitive headers are always present + if (!Array.isArray(options.sensitiveHeaders)) { options.sensitiveHeaders = []; } @@ -8518,10 +8527,6 @@ function isSubdomain(subdomain, domain) { return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain); } -function isArray(value) { - return value instanceof Array; -} - function isString(value) { return typeof value === "string" || value instanceof String; } @@ -8539,7 +8544,7 @@ function isURL(value) { } function escapeRegex(regex) { - return regex.replace(/[\]\\/()*+?.$]/g, "\\$&"); + return regex.replace(/[[\]\\/()*+?.^$|]/g, "\\$&"); } // Exports From 68cb640262938e561659649e28a1ad17f5773172 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Oct 2026 00:26:25 +0000 Subject: [PATCH 2/2] fix: apply audit fixes --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index ae8f9a4..aef89a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -536,9 +536,9 @@ "license": "MIT" }, "node_modules/follow-redirects": { - "version": "1.16.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", - "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.2.tgz", + "integrity": "sha512-/kVP2U8z596Ia0gwFrwyIeo74ta5aVmSeU1FfAUMAmcEP5EP7zydmag3SLiN64NaRKef3lxsq7i/g7ltJQDGow==", "funding": [ { "type": "individual",