Commit 736220b8 authored by Michel Martens's avatar Michel Martens Committed by antirez
Browse files

Reset masterauth if an empty string is configured.

parent b37512a2
...@@ -493,7 +493,11 @@ void configSetCommand(redisClient *c) { ...@@ -493,7 +493,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);
server.masterauth = zstrdup(o->ptr); if (sdslen(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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment