Skip to content

Commit

Permalink
fix: allow : to be used in password
Browse files Browse the repository at this point in the history
  • Loading branch information
WikiRik committed Oct 11, 2023
1 parent a6a49b8 commit 287e6b7
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 287e6b7

Please sign in to comment.