You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure all elements of connection prelude are frozen
We ran into a production issue when upgrading the `redis` gem from
v4.8.0 to v5.0.2. Our instrumentation is based on
[peek-redis](https://github.com/peek/peek-redis), which patches
`Redis::Client#call`. The instrumentation stores the Redis command and
redacts the password from the `AUTH` command.
In v4.8.0, it was safe to alter the command since it was already sent
on the wire and discarded.
However, in v5.0, `Redis::Client` now inherits from `RedisClient` from
this gem, and `RedisClient::Config#connection_prelude` is used to
establish a connection. While the prelude array was frozen, the
command arrays themselves were not. As a result, the instrumentation
inadvertently altered the `AUTH` password. This resulted in
`WRONGPASS` and `NOAUTH` errors upon a reconnect.
To prevent clients from mucking with the prelude, do a deep freeze on
all the elements.
0 commit comments