mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Merge pull request #5801 from soloestoy/fix-getuser-null-pointer
ACL: fix null pointer in getuser
This commit is contained in:
commit
e545b30f97
@ -618,6 +618,11 @@ void aclCommand(client *c) {
|
||||
}
|
||||
} else if (!strcasecmp(sub,"getuser") && c->argc == 3) {
|
||||
user *u = ACLGetUserByName(c->argv[2]->ptr,sdslen(c->argv[2]->ptr));
|
||||
if (u == NULL) {
|
||||
addReplyNull(c);
|
||||
return;
|
||||
}
|
||||
|
||||
addReplyMapLen(c,2);
|
||||
|
||||
/* Flags */
|
||||
|
Loading…
x
Reference in New Issue
Block a user