mirror of
https://github.com/fluencelabs/redis
synced 2025-06-12 08:41:21 +00:00
Fix for issue #132. Now AUTH raises an error if no server password is configured.
This commit is contained in:
@ -1249,7 +1249,9 @@ int prepareForShutdown() {
|
||||
/*================================== Commands =============================== */
|
||||
|
||||
void authCommand(redisClient *c) {
|
||||
if (!server.requirepass || !strcmp(c->argv[1]->ptr, server.requirepass)) {
|
||||
if (!server.requirepass) {
|
||||
addReplyError(c,"Client sent AUTH, but no password is set");
|
||||
} else if (!strcmp(c->argv[1]->ptr, server.requirepass)) {
|
||||
c->authenticated = 1;
|
||||
addReply(c,shared.ok);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user