Open teto opened 1 year ago
Actually I'm a bit confused, according to RFC and general URI scheme authority is [user:[password]]@
and password seems deprecated according to rfc3986.
Still I see that redis upstream uses [[user:]password@
scheme. To avoid further confusion I think I'll implement spec as per https://github.com/lettuce-io/lettuce-core/wiki/Redis-URI-and-connection-details#uri-syntax. It looks solid and covers usual connection, TLS, sentinel.
Hedis doesn't seem to interpret the redis uri like redis-cli does
expected by redis-cli -u since informatikr/hedis doesn't interpret it the same way as redis-cli (hedis will parse password as the username in redis://password@localhost while redis-cli uses it as password-) but I could not find it anywhere.
To reproduce start redis-server with something like
Then you can connect via
redis-cli -u redis://toto@localhost
but passing the sameredis://toto@localhost
to parseConnectInfo, "toto" gets parsed as the username instead of the password.NB: the iana link seems to be the official spec, I had a hard time finding a reference on redis docs https://github.com/redis/redis-doc/issues/2523