From adcd0807d66ef58649d245a3231738ed698fdeb2 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas <davanum@gmail.com> Date: Fri, 17 Jul 2015 22:25:48 -0400 Subject: [PATCH] Allow a forward slash as a part of the user/password quote method has a safe parameter which is set to '/' so when the end user has a / in the rabbit_password then we end up leaving that in the url which ends up looking like: amqp://stackrabbit:pass/word@10.0.0.9:5672// Which is clearly invalid, so we should set safe parameter to '' which allows the url to be constructed properly (see transport.py TransportURL.__str__ method works this work) Closes-Bug: #1474933 Change-Id: I14fb54440d0925f3676e18d13182ed0fa9c34ca2 --- oslo_messaging/_drivers/impl_rabbit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oslo_messaging/_drivers/impl_rabbit.py b/oslo_messaging/_drivers/impl_rabbit.py index 73a2c80ea..66ee83eee 100644 --- a/oslo_messaging/_drivers/impl_rabbit.py +++ b/oslo_messaging/_drivers/impl_rabbit.py @@ -452,8 +452,8 @@ class Connection(object): adr, default_port=self.rabbit_port) self._url += '%samqp://%s:%s@%s:%s/%s' % ( ";" if self._url else '', - parse.quote(self.rabbit_userid), - parse.quote(self.rabbit_password), + parse.quote(self.rabbit_userid, ''), + parse.quote(self.rabbit_password, ''), self._parse_url_hostname(hostname), port, virtual_host)