-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Messenger] [AMQP] Support decoding user/pass with special characters from DSN #45549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Thank you for this issue. |
I'm facing this problem at this moment. Our application needs to connect to a 3rd party RabbitMQ instance and the password contains a @. |
This was referenced Sep 9, 2022
xabbuh
added a commit
that referenced
this issue
Sep 11, 2022
…es/passwords (xabbuh) This PR was merged into the 4.4 branch. Discussion ---------- [Messenger] decode URL-encoded characters in DSN's usernames/passwords | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #45549 | License | MIT | Doc PR | Commits ------- 7ae7d7b decode URL-encoded characters in DSN's usernames/passwords
Raised an issue #47788 as my password may contain any of characters which urldecode tries to decode. For example + sign which will be replaced by space. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Currently, amqp-messenger doesn't decode user/pass with special characters from DSN. Connection will fail (invalid credentials) if you encode your user/pass because it will contain unencoded characters (with
%
prefix). And if you try to leave user/pass unencoded in dsn, it might fail or be invalid (parse_url()
function) with slash/
for example.Example
Connection failed (invalid credentials) with encoded special characters in user/pass:
MESSENGER_TRANSPORT_DSN=amqp://gu%2Fest:gu%2Fest@localhost:5672/%2f/messages
Invalid parsing with unencoded special characters in user/pass:
MESSENGER_TRANSPORT_DSN=amqp://gu/est:gu/est@localhost:5672/%2f/messages
Parsing failed with unencoded special character in pass:
MESSENGER_TRANSPORT_DSN=amqp://guest:gu/est@localhost:5672/%2f/messages
The text was updated successfully, but these errors were encountered: