ACL: fix ACLCheckUserCredentials() usage in AUTH.

This commit is contained in:
antirez 2019-01-09 17:09:30 +01:00
parent f5d918b2bb
commit 42271cff2d

View File

@ -2867,7 +2867,7 @@ int writeCommandsDeniedByDiskError(void) {
void authCommand(client *c) { void authCommand(client *c) {
if (!server.requirepass) { if (!server.requirepass) {
addReplyError(c,"Client sent AUTH, but no password is set"); addReplyError(c,"Client sent AUTH, but no password is set");
} else if (ACLCheckUserCredentials(NULL,c->argv[1]->ptr)) { } else if (ACLCheckUserCredentials(NULL,c->argv[1]) == C_OK) {
c->authenticated = 1; c->authenticated = 1;
addReply(c,shared.ok); addReply(c,shared.ok);
} else { } else {