Commit 0e25c0cc authored by antirez's avatar antirez
Browse files

Allow AUTH when Redis is busy because of timedout Lua script.

If the server is password protected we need to accept AUTH when there is
a server busy (-BUSY) condition, otherwise it will be impossible to send
SHUTDOWN NOSAVE or SCRIPT KILL.

This fixes issue #708.
parent 151b606c
...@@ -1623,6 +1623,7 @@ int processCommand(redisClient *c) { ...@@ -1623,6 +1623,7 @@ int processCommand(redisClient *c) {
/* Lua script too slow? Only allow commands with REDIS_CMD_STALE flag. */ /* Lua script too slow? Only allow commands with REDIS_CMD_STALE flag. */
if (server.lua_timedout && if (server.lua_timedout &&
c->cmd->proc != authCommand &&
!(c->cmd->proc == shutdownCommand && !(c->cmd->proc == shutdownCommand &&
c->argc == 2 && c->argc == 2 &&
tolower(((char*)c->argv[1]->ptr)[0]) == 'n') && tolower(((char*)c->argv[1]->ptr)[0]) == 'n') &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment