From: antirez Date: Mon, 31 Oct 2011 08:57:06 +0000 (+0100) Subject: It is now possible to disable password authentication via CONFIG SET. Thanks to Jan... X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/1eceb85ebc127480ffe3d80be00e09472fa684ec?hp=db6a2e7f78f99503eaa2fcc0574a16eea570637a It is now possible to disable password authentication via CONFIG SET. Thanks to Jan Oberst. This closes issue #171. --- diff --git a/src/config.c b/src/config.c index 789c10fc..6e310701 100644 --- a/src/config.c +++ b/src/config.c @@ -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);