Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
097d57f5
Commit
097d57f5
authored
Jan 28, 2019
by
antirez
Browse files
ACL: fix crash when checking for subcommands.
parent
f4c39db4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/acl.c
View file @
097d57f5
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment