/*================================== 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 {