Commit 1eceb85e authored by antirez's avatar antirez
Browse files

It is now possible to disable password authentication via CONFIG SET. Thanks...

It is now possible to disable password authentication via CONFIG SET. Thanks to Jan Oberst. This closes issue #171.
parent db6a2e7f
...@@ -345,7 +345,7 @@ void configSetCommand(redisClient *c) { ...@@ -345,7 +345,7 @@ void configSetCommand(redisClient *c) {
server.dbfilename = zstrdup(o->ptr); server.dbfilename = zstrdup(o->ptr);
} else if (!strcasecmp(c->argv[2]->ptr,"requirepass")) { } else if (!strcasecmp(c->argv[2]->ptr,"requirepass")) {
zfree(server.requirepass); zfree(server.requirepass);
server.requirepass = zstrdup(o->ptr); 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); server.masterauth = zstrdup(o->ptr);
......
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