Closed brentby closed 2 years ago
Wouldn't a permanent solution simply be for Rebus to URL decode values it had picked out of the URL manually?
Yes that's correct, the fix is very simple. The permanent solution is to URL-decode the values it had picked out of the URL manually.
I mention the workaround as it may be helpful to anyone that wants to wait for the official Nuget fix.
I think I've fixed this issue in Rebus.RabbitMq 7.3.5, which is out on NuGet.org now 🙂
Thanks for reporting this issue! 👍
This one was hard to diagnose - as I also ran into the same issues reported in #80 when attempting to connect to AmazonMQ - but it should be fairly easy to fix.
The problem is that you'll get the following error when connecting with a password that should be URL-encoded because it has special characters:
The issue is that the caller SHOULD URL-encode the password when constructing the amqp URI, but the
ConnectionManager
fails to decode it when parsing the URI in both constructors:I wrote a test program using the raw
RabbitMQ.Client
library and confirmed the behavior. This sample assumes atest
virtual host,test_user
for username, andp@ssword
for a password. See:A temporary work-around is to validate passwords to ensure that they don't require URL-encoding, but ideally this will be solved as the special characters are good practice for strong passwords.