mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
ACL: HELLO should stop if the user is not authenticated.
This commit is contained in:
parent
b43d70df56
commit
f5d918b2bb
@ -2053,6 +2053,15 @@ void helloCommand(client *c) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* At this point we need to be authenticated to continue. */
|
||||||
|
if (!c->authenticated) {
|
||||||
|
addReplyError(c,"-NOAUTH HELLO must be called with the client already "
|
||||||
|
"authenticated, otherwise the HELLO AUTH <user> <pass> "
|
||||||
|
"option can be used to authenticate the client and "
|
||||||
|
"select the RESP protocol version at the same time");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Let's switch to RESP3 mode. */
|
/* Let's switch to RESP3 mode. */
|
||||||
c->resp = 3;
|
c->resp = 3;
|
||||||
addReplyMapLen(c,7);
|
addReplyMapLen(c,7);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user