From ea11b02a44ec53c6aa91a8a9c9444cb38db07e6b Mon Sep 17 00:00:00 2001 From: Lew Gordon Date: Thu, 8 Jul 2021 11:43:26 -0400 Subject: [PATCH] fix: 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 --- doc/api/http.md | 4 ++++ doc/api/https.md | 4 ++++ lib/internal/url.js | 2 +- test/parallel/test-http-decoded-auth.js | 31 +++++++++++++++++++++++++ 4 files changed, 40 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 24a0a92f47e387..6707ee2608b194 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -2803,6 +2803,10 @@ This can be overridden for servers and client requests by passing the