提交 649b304e 编写于 作者: M Michel Martens 提交者: antirez

Reset masterauth if an empty string is configured.

上级 9cd06e44
......@@ -532,7 +532,11 @@ void configSetCommand(redisClient *c) {
server.requirepass = ((char*)o->ptr)[0] ? zstrdup(o->ptr) : NULL;
} else if (!strcasecmp(c->argv[2]->ptr,"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")) {
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
ll < 0) goto badfmt;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册