From 8d1096c3d640371219cf7103d35470c5a4ed3a08 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 --- doc/api/http.md | 4 +++ doc/api/https.md | 4 +++ lib/internal/url.js | 2 +- test/parallel/test-http-decoded-auth.js | 33 +++++++++++++++++++++++++ 4 files changed, 42 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 84e98f5ff79d1e..0555b8dd4227f0 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -2804,6 +2804,10 @@ This can be overridden for servers and client requests by passing the