Fixed issue 23 about AUTH

This commit is contained in:
antirez 2009-04-02 09:57:06 +02:00
parent 774e304780
commit 2e77c2ee72

View File

@ -2009,7 +2009,7 @@ eoferr: /* unexpected end of file is handled here with a fatal exit */
/*================================== Commands =============================== */
static void authCommand(redisClient *c) {
if (!strcmp(c->argv[1]->ptr, server.requirepass)) {
if (!server.requirepass || !strcmp(c->argv[1]->ptr, server.requirepass)) {
c->authenticated = 1;
addReply(c,shared.ok);
} else {