Question mark in password breaks connection string
aleybovich opened this issue · comments
Andrey commented
When executing this line:
const conn = await amqp.connect(`amqp://${user}:${pass}@${host}:${port}`);
if pass
contains a ?
(e.g. abc?def
) then only the part of the password before ?
is being used, leading to authentication errors.
Any workaround?
Stephen Cresswell commented
Have you tried escaping it?
Stephen Cresswell commented
const connection = await amqplib.connect('amqp://steve:pass%3Fword@localhost');
works for me