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
c79b01f4
Commit
c79b01f4
authored
Jan 15, 2019
by
antirez
Browse files
ACL: the AUTH command can be always executed.
parent
cca64672
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/acl.c
View file @
c79b01f4
...
...
@@ -298,7 +298,9 @@ int ACLCheckCommandPerm(client *c) {
if
(
c
->
cmd
->
id
>=
USER_MAX_COMMAND_BIT
)
return
C_ERR
;
/* Check if the user can execute this command. */
if
(
!
(
u
->
flags
&
USER_FLAG_ALLCOMMANDS
))
{
if
(
!
(
u
->
flags
&
USER_FLAG_ALLCOMMANDS
)
&&
c
->
cmd
->
proc
!=
authCommand
)
{
uint64_t
wordid
=
id
/
sizeof
(
u
->
allowed_commands
[
0
])
/
8
;
uint64_t
bit
=
1
<<
(
id
%
(
sizeof
(
u
->
allowed_commands
[
0
]
*
8
)));
/* If the bit is not set we have to check further, in case the
...
...
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