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
889eaba2
Commit
889eaba2
authored
Apr 22, 2020
by
antirez
Browse files
ACL: deny commands execution of disabled users.
parent
c2db3de4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/acl.c
View file @
889eaba2
...
@@ -1055,6 +1055,10 @@ int ACLCheckCommandPerm(client *c, int *keyidxptr) {
...
@@ -1055,6 +1055,10 @@ int ACLCheckCommandPerm(client *c, int *keyidxptr) {
/* If there is no associated user, the connection can run anything. */
/* If there is no associated user, the connection can run anything. */
if
(
u
==
NULL
)
return
ACL_OK
;
if
(
u
==
NULL
)
return
ACL_OK
;
/* If the user is disabled we don't allow the execution of any
* command. */
if
(
!
(
u
->
flags
&
USER_FLAG_ENABLED
))
return
ACL_DENIED_CMD
;
/* Check if the user can execute this command. */
/* Check if the user can execute this command. */
if
(
!
(
u
->
flags
&
USER_FLAG_ALLCOMMANDS
)
&&
if
(
!
(
u
->
flags
&
USER_FLAG_ALLCOMMANDS
)
&&
c
->
cmd
->
proc
!=
authCommand
)
c
->
cmd
->
proc
!=
authCommand
)
...
...
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