From 287e6b775afc3a99ad0381898b5be00ddd83f4e1 Mon Sep 17 00:00:00 2001 From: Rik Smale <13023439+WikiRik@users.noreply.github.com> Date: Wed, 11 Oct 2023 06:57:53 +0000 Subject: [PATCH] fix: allow : to be used in password --- src/helpers/config-helper.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/helpers/config-helper.js b/src/helpers/config-helper.js index c68c29342..d62adddb2 100644 --- a/src/helpers/config-helper.js +++ b/src/helpers/config-helper.js @@ -181,10 +181,11 @@ const api = { }; if (urlParts.auth) { - result = _.assign(result, { - username: urlParts.auth.split(':')[0], - password: urlParts.auth.split(':')[1], - }); + const authParts = urlParts.auth.split(':'); + result.username = authParts[0]; + if (authParts.length > 1) { + result.password = authParts.slice(1).join(':'); + } } return result;