-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(address-parsing): don't truncate ':' passwords
Fix a bug which truncated passwords containing a ':' character because the parseAddress function relied upon node's url.parse().auth which returns the user:pass pair already URI-decoded. Fixes #318
- Loading branch information
Showing
2 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,6 +92,16 @@ describe('Address Parsing', function() { | |
rootUri: 'amqps://username:[email protected]:1234', | ||
href: 'amqps://username:[email protected]:1234/myroute' | ||
} | ||
}, | ||
{ | ||
description: 'should match credentials if passwd contains colons', | ||
address: 'amqp://username:ii%7DS%[email protected]', | ||
expected: { | ||
protocol: 'amqp', host: 'my.amqp.server', port: 5672, path: '/', | ||
user: 'username', pass: 'ii}S:ae3', | ||
rootUri: 'amqp://username:ii%7DS%[email protected]:5672', | ||
href: 'amqp://username:ii%7DS:[email protected]' | ||
} | ||
} | ||
].forEach(function(testCase) { | ||
it('should match ' + testCase.description, function() { | ||
|