go-redis icon indicating copy to clipboard operation
go-redis copied to clipboard

When the password for a Redis connection string contains an '@' symbol, the connection cannot be recognized

Open ayedaren opened this issue 1 year ago • 2 comments

When the password for a Redis connection string contains an '@' symbol, the connection cannot be recognized, for example:

redis://:xxx!@[email protected]:6379/10

ayedaren avatar Nov 14 '23 08:11 ayedaren

According to RFC 3986, section 3.2.1, it needs to be percent encoded:

userinfo = *( unreserved / pct-encoded / sub-delims / ":" )

So you should try this:

redis://:xxx!%[email protected]:6379/10

using %40 instead @

peczenyj avatar Nov 14 '23 08:11 peczenyj

Maybe this help? url.PathEscape

tzq0301 avatar Dec 24 '23 15:12 tzq0301