]> git.saurik.com Git - redis.git/blobdiff - src/config.c
It is now possible to disable password authentication via CONFIG SET. Thanks to Jan...
[redis.git] / 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);