ACL: check arity of LIST / USERS subcommand.

This commit is contained in:
antirez 2019-01-31 18:32:49 +01:00
parent bc9b118e05
commit 74b7afdf71

View File

@ -973,7 +973,9 @@ void aclCommand(client *c) {
addReplyBulkCBuffer(c,thispat,sdslen(thispat));
}
}
} else if (!strcasecmp(sub,"list") || !strcasecmp(sub,"users")) {
} else if ((!strcasecmp(sub,"list") || !strcasecmp(sub,"users")) &&
c->argc == 2)
{
int justnames = !strcasecmp(sub,"users");
addReplyArrayLen(c,raxSize(Users));
raxIterator ri;