Skip to content

Commit

Permalink
fix: allow : to be used in password (#1390)
Browse files Browse the repository at this point in the history
  • Loading branch information
WikiRik authored Nov 3, 2023
1 parent f68b7f9 commit a52f8bd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/helpers/config-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a52f8bd

Please sign in to comment.