Fix HELLO error message command syntax suggestion (#11809)

A simple HELLO command to a password protected Redis server replies
with an error with another command suggestion. This omits protocol version
from HELLO command arguments which causes another error.
This PR adds the protocol version in the command suggestion.
This commit is contained in:
M Sazzadul Hoque 2023-02-21 19:05:58 +06:00 committed by GitHub
parent 40659c3424
commit 4cc2b0dc1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3419,7 +3419,7 @@ void helloCommand(client *c) {
/* 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> "
"authenticated, otherwise the HELLO <proto> AUTH <user> <pass> "
"option can be used to authenticate the client and "
"select the RESP protocol version at the same time");
return;