mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
ACL: fix crash when checking for subcommands.
This commit is contained in:
parent
f4c39db450
commit
097d57f56e
@ -566,8 +566,13 @@ int ACLCheckCommandPerm(client *c) {
|
||||
* command is allowed just with that specific subcommand. */
|
||||
if (ACLGetUserCommandBit(u,id) == 0) {
|
||||
/* Check if the subcommand matches. */
|
||||
if (u->allowed_subcommands == NULL || c->argc < 2)
|
||||
if (c->argc < 2 ||
|
||||
u->allowed_subcommands == NULL ||
|
||||
u->allowed_subcommands[id] == NULL)
|
||||
{
|
||||
return ACL_DENIED_CMD;
|
||||
}
|
||||
|
||||
long subid = 0;
|
||||
while (1) {
|
||||
if (u->allowed_subcommands[id][subid] == NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user