From 54dd3df94336701a2c27db966e12c73afe8b40fd 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 | 8 ++++- doc/api/https.md | 4 +++ lib/internal/url.js | 2 +- test/parallel/test-http-decoded-auth.js | 48 +++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 test/parallel/test-http-decoded-auth.js diff --git a/doc/api/http.md b/doc/api/http.md index 4b4f758287f516..4b0c15c7591fca 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -2829,7 +2829,13 @@ This can be overridden for servers and client requests by passing the