XINFO should use lookupKeyReadOrReply (#8436)

This bug would have let users observe logically expired keys on replicas and
during CLIENT PAUSE WRITE.

(cherry picked from commit f2a5fe3678)
This commit is contained in:
zhaozhao.zz 2021-02-02 16:51:19 +08:00 committed by Oran Agra
parent dcf409f8e7
commit 56ef0aa7c8
1 changed files with 1 additions and 1 deletions

View File

@ -2716,7 +2716,7 @@ NULL
key = c->argv[2];
/* Lookup the key now, this is common for all the subcommands but HELP. */
robj *o = lookupKeyWriteOrReply(c,key,shared.nokeyerr);
robj *o = lookupKeyReadOrReply(c,key,shared.nokeyerr);
if (o == NULL || checkType(c,o,OBJ_STREAM)) return;
s = o->ptr;