From 2bc301dcff7f8d37dbd655e7816c4d38b9ce0f8b Mon Sep 17 00:00:00 2001 From: Lew Gordon Date: Thu, 8 Jul 2021 11:43:26 -0400 Subject: [PATCH] http: decodes url.username and url.password for authorization header This change properly decodes the url.username and url.password for the authorization header constructed from the URL object for http(s) requests. Fixes: https://github.com/nodejs/node/issues/31439 PR-URL: https://github.com/nodejs/node/pull/39310 Reviewed-By: Matteo Collina Reviewed-By: Robert Nagy Reviewed-By: James M Snell --- doc/api/http.md | 4 +++ doc/api/https.md | 4 +++ lib/internal/url.js | 2 +- test/parallel/test-http-decoded-auth.js | 48 +++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 test/parallel/test-http-decoded-auth.js diff --git a/doc/api/http.md b/doc/api/http.md index b04890e97c4ce9..c4d5173ce0791b 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -2767,6 +2767,10 @@ This can be overridden for servers and client requests by passing the