wagslane / go-rabbitmq

A wrapper of streadway/amqp that provides reconnection logic and sane defaults
https://blog.boot.dev/golang/connecting-to-rabbitmq-in-golang-easy/
MIT License
805 stars 128 forks source link

Credentials are being logged on connection error #190

Open latuszek opened 1 month ago

latuszek commented 1 month ago

Hi, I've just come into a problem with logged credentials in the connection URL:

time=2024-10-01T09:30:06.453Z level=INFO source=:0 msg="gorabbit WARN: failed to connect to amqp server amqp://some-user:some-password@127.0.0.1:5671/: dial tcp 127.0.0.1:5671: connect: connection refused"

The credentials should never be written as a plain text log.

To test this you can simply set the wrong URL and try to connect.