Skip to content

Commit

Permalink
Fix connection config password node being decoded if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
dresende committed Nov 21, 2023
1 parent 2e2a156 commit 70b1be8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/ConnectionConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ ConnectionConfig.parseUrl = function(url) {

if (typeof url.username == 'string') {
options.user = url.username;
options.password = url.password;
try {
options.password = decodeURIComponent(url.password);
} catch (e) {
options.password = url.password;
}
} else if (url.auth) {
var auth = url.auth.split(':');
options.user = auth.shift();
Expand Down

0 comments on commit 70b1be8

Please sign in to comment.