mirror of
https://github.com/fluencelabs/redis
synced 2025-03-31 06:41:07 +00:00
Reset masterauth if an empty string is configured.
This commit is contained in:
parent
9cd06e4406
commit
649b304e0f
@ -532,7 +532,11 @@ void configSetCommand(redisClient *c) {
|
|||||||
server.requirepass = ((char*)o->ptr)[0] ? zstrdup(o->ptr) : NULL;
|
server.requirepass = ((char*)o->ptr)[0] ? zstrdup(o->ptr) : NULL;
|
||||||
} else if (!strcasecmp(c->argv[2]->ptr,"masterauth")) {
|
} else if (!strcasecmp(c->argv[2]->ptr,"masterauth")) {
|
||||||
zfree(server.masterauth);
|
zfree(server.masterauth);
|
||||||
|
if (sdslen(o->ptr)) {
|
||||||
server.masterauth = zstrdup(o->ptr);
|
server.masterauth = zstrdup(o->ptr);
|
||||||
|
} else {
|
||||||
|
server.masterauth = NULL;
|
||||||
|
}
|
||||||
} else if (!strcasecmp(c->argv[2]->ptr,"maxmemory")) {
|
} else if (!strcasecmp(c->argv[2]->ptr,"maxmemory")) {
|
||||||
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
||||||
ll < 0) goto badfmt;
|
ll < 0) goto badfmt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user