jandelgado/rabtap

How to escape special characters in password

melyadon opened this issue · 2 comments

Hi,

Rabtab 1.38.2 on Windows 11. I have a password with a few special characters which I am trying to pass to rabtap's --uri. Any idea how to escape it? I have tried % escape to no avail.

rabtap.exe --uri="amqps://myuser:AB(cdfeJp7z^E0..,@mydomain:5671" queue create test_queue -kv
time="2023-08-28T09:59:31+02:00" level=fatal msg="failed to parse AMQP URL: parse "amqps://myuser:AB(cdfeJp7z^E0..,@my domain:5671": net/url: invalid userinfo"

Cheers
Sébastien

The error comes straight from golang's URL parser , which requires you to url-encode all special characters, e.g. ^ = %5E, ( = %28, , = %2C etc.

See also https://github.com/jandelgado/rabtap#broker-uri-specification

Thanks a lot! that did the trick.