Hello, setup: redis 7.0.2, RESP3 requested, ACL, protected mode off, AUTH to other than default user. I found strange behaviour when using HGETALL command (SMEMBERS too). In RESP3, HGETALL should return map type. It does, but only when default user has nopass set. When I set any password to default user, HGETALL on same key will start to return array?
Response, when default user has set password: "OK\r\n:0\r\n*6\r\n$4\r\nkey1\r\n$2\r\n10\r\n$4\r\nkey2\r\n$2\r\n20\r\n$4\r\nkey3\r\n$2\r\n30\r\n+OK\r\n"
Response, when default user has NOT SET password "OK\r\n:0\r\n%3\r\n$4\r\nkey1\r\n$2\r\n10\r\n$4\r\nkey2\r\n$2\r\n20\r\n$4\r\nkey3\r\n$2\r\n30\r\n+OK\r\n"
Is this bug or intended behaviour? Thanks.
Comment From: sundb
@Eddie-cz Auth doesn't change resp.
Are you execute HELLO 3 before AUTH ** after you set password to default user?
Comment From: Eddie-cz
I have a c++ client, it sends HELLO 3, then AUTH, then HGETALL, then QUIT. When I run it twice, and in between runs I set default user password using ACL SETUSER, I get different responses.
Comment From: sundb
@Eddie-cz You need to change the order of HELLO and AUTH, otherwise HELLO will fail due to noauth.
Comment From: Eddie-cz
Thanks for quick response, I will try it as you suggested.
Comment From: sundb
Before you set the password, HELLO 3 will convert the client from resp2 to resp3, but after you set the password, it will fail because HELLO 3 is before auth, so the client will still be resp2 .
Because some commands return the same result under resp2 and resp3, that's why the situation you described (some commands return different).
Comment From: Eddie-cz
Closing, works as intended.