diff --git a/CHANGELOG.md b/CHANGELOG.md index b720d15..abbac49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [2.0.1] (2021-07-07) + +### Bug Fixes +- Support username & password with special characters. + + ## [2.0.0](https://github.com/team-supercharge/nest-amqp/compare/v1.3.0...v2.0.0) (2021-04-14) diff --git a/package.json b/package.json index 7e03185..a8d73fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@team-supercharge/nest-amqp", - "version": "2.0.0", + "version": "2.0.1", "description": "AMQP 1.0 module for Nest framework", "author": "Supercharge", "license": "MIT", diff --git a/src/service/amqp/amqp.service.ts b/src/service/amqp/amqp.service.ts index 6f4c8f9..3eb0769 100644 --- a/src/service/amqp/amqp.service.ts +++ b/src/service/amqp/amqp.service.ts @@ -54,8 +54,11 @@ export class AMQPService { logger.log('creating AMQP client'); const { throwExceptionOnConnectionError, connectionUri, ...rheaConnectionOptions } = options; - const { protocol, username, password, hostname, port } = new URL(connectionUri); - + const url: URL = new URL(connectionUri); + const { protocol, hostname, port } = url; + let {username, password} = url; + password = decodeURIComponent(password); + username = decodeURIComponent(username); logger.log( `initializing client connection to ${JSON.stringify({ protocol,