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
ac6e49de
Commit
ac6e49de
authored
Jan 18, 2019
by
antirez
Browse files
ACL: implement resetpass directive and adjust test.
parent
2c66c525
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/acl.c
View file @
ac6e49de
...
...
@@ -190,6 +190,9 @@ int ACLSetUser(user *u, const char *op, ssize_t oplen) {
}
else
if
(
!
strcasecmp
(
op
,
"nopass"
))
{
u
->
flags
|=
USER_FLAG_NOPASS
;
listEmpty
(
u
->
passwords
);
}
else
if
(
!
strcasecmp
(
op
,
"resetpass"
))
{
u
->
flags
&=
~
USER_FLAG_NOPASS
;
listEmpty
(
u
->
passwords
);
}
else
if
(
op
[
0
]
==
'>'
)
{
sds
newpass
=
sdsnewlen
(
op
+
1
,
oplen
-
1
);
listNode
*
ln
=
listSearchKey
(
u
->
passwords
,
newpass
);
...
...
tests/unit/dump.tcl
View file @
ac6e49de
...
...
@@ -362,7 +362,7 @@ start_server {tags {"dump"}} {
r -1 lpush list a b c d
$second config set requirepass foobar2
catch
{
r -1 migrate $second_host $second_port list 9 5000 AUTH foobar
}
err
assert_match
{
*
invalid password
*
}
$err
assert_match
{
*
WRONGPASS
*
}
$err
}
}
}
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