Skip to content

Commit

Permalink
lib: update undici to v5.28.3
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: nodejs-private/node-private#536
CVE-ID: CVE-2024-24758
  • Loading branch information
mcollina authored and marco-ippolito committed Feb 12, 2024
1 parent d3d357a commit f48b896
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions deps/undici/src/lib/fetch/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,9 @@ async function httpRedirectFetch (fetchParams, response) {
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
request.headersList.delete('authorization')

// https://fetch.spec.whatwg.org/#authentication-entries
request.headersList.delete('proxy-authorization', true)

// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
request.headersList.delete('cookie')
request.headersList.delete('host')
Expand Down
2 changes: 1 addition & 1 deletion deps/undici/src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "undici",
"version": "5.26.4",
"version": "5.28.3",
"description": "An HTTP/1.1 client, written from scratch for Node.js",
"homepage": "https://undici.nodejs.org",
"bugs": {
Expand Down
1 change: 1 addition & 0 deletions deps/undici/undici.js
Original file line number Diff line number Diff line change
Expand Up @@ -10002,6 +10002,7 @@ var require_fetch = __commonJS({
}
if (!sameOrigin(requestCurrentURL(request), locationURL)) {
request.headersList.delete("authorization");
request.headersList.delete("proxy-authorization", true);
request.headersList.delete("cookie");
request.headersList.delete("host");
}
Expand Down
2 changes: 1 addition & 1 deletion src/undici_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
// Refer to tools/update-undici.sh
#ifndef SRC_UNDICI_VERSION_H_
#define SRC_UNDICI_VERSION_H_
#define UNDICI_VERSION "5.26.4"
#define UNDICI_VERSION "5.28.3"
#endif // SRC_UNDICI_VERSION_H_

0 comments on commit f48b896

Please sign in to comment.