From fce53031e5efc20f1e5601bc907d6f1926439497 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 34cbf0a8e2b1ce..9c35e5d090a83b 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -2835,6 +2835,10 @@ This can be overridden for servers and client requests by passing the