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
8a531ced
Commit
8a531ced
authored
Sep 25, 2019
by
antirez
Browse files
ACL: fix ##6408, default user state affecting all the connections.
parent
eda703ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
8a531ced
...
@@ -3341,9 +3341,10 @@ int processCommand(client *c) {
...
@@ -3341,9 +3341,10 @@ int processCommand(client *c) {
/* Check if the user is authenticated. This check is skipped in case
/* Check if the user is authenticated. This check is skipped in case
* the default user is flagged as "nopass" and is active. */
* the default user is flagged as "nopass" and is active. */
int auth_required = !(DefaultUser->flags & USER_FLAG_NOPASS) &&
int auth_required = (!(DefaultUser->flags & USER_FLAG_NOPASS) ||
DefaultUser->flags & USER_FLAG_DISABLED) &&
!c->authenticated;
!c->authenticated;
if (auth_required
|| DefaultUser->flags & USER_FLAG_DISABLED
) {
if (auth_required) {
/* AUTH and HELLO are valid even in non authenticated state. */
/* AUTH and HELLO are valid even in non authenticated state. */
if (c->cmd->proc != authCommand || c->cmd->proc == helloCommand) {
if (c->cmd->proc != authCommand || c->cmd->proc == helloCommand) {
flagTransaction(c);
flagTransaction(c);
...
...
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