From 87af31de202b56b6804803a3f14ed6fabefe5089 Mon Sep 17 00:00:00 2001 From: Ben Hardill Date: Thu, 28 Oct 2021 09:18:17 +0100 Subject: [PATCH] HTTP Basic Auth should always add : to username fix for #3235 --- .../@node-red/nodes/core/network/21-httprequest.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/network/21-httprequest.js b/packages/node_modules/@node-red/nodes/core/network/21-httprequest.js index 3fe58d772..86c9ac2c7 100644 --- a/packages/node_modules/@node-red/nodes/core/network/21-httprequest.js +++ b/packages/node_modules/@node-red/nodes/core/network/21-httprequest.js @@ -302,11 +302,11 @@ in your Node-RED user directory (${RED.settings.userDir}). var cred = "" if (this.credentials.user) { // opts.username = this.credentials.user; - cred = this.credentials.user + cred = this.credentials.user + ":" } if (this.credentials.password) { // opts.password = this.credentials.password; - cred += ":" + this.credentials.password + cred += this.credentials.password } // build own basic auth header opts.headers.Authorization = "Basic " + Buffer.from(cred).toString("base64");