]> git.saurik.com Git - redis.git/commitdiff
It is now possible to disable password authentication via CONFIG SET. Thanks to Jan...
authorantirez <antirez@gmail.com>
Mon, 31 Oct 2011 08:57:06 +0000 (09:57 +0100)
committerantirez <antirez@gmail.com>
Mon, 31 Oct 2011 08:57:06 +0000 (09:57 +0100)
src/config.c

index 789c10fc2e8bdf21c311642e099cbe1e12c1d8dd..6e31070122d622cf2fe8a722f7f5e5ce67a01d64 100644 (file)
@@ -345,7 +345,7 @@ void configSetCommand(redisClient *c) {
         server.dbfilename = zstrdup(o->ptr);
     } else if (!strcasecmp(c->argv[2]->ptr,"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")) {
         zfree(server.masterauth);
         server.masterauth = zstrdup(o->ptr);