Commit 02d465c8 authored by antirez's avatar antirez
Browse files

Don't log admin commands in MONITOR.

Otherwise there are security risks, especially when providing Redis as a
service, the user may "sniff" for admin commands renamed to an
unguessable string via rename-command in redis.conf.
parent 4d8f4262
...@@ -1938,7 +1938,7 @@ void call(redisClient *c, int flags) { ...@@ -1938,7 +1938,7 @@ void call(redisClient *c, int flags) {
* not generated from reading an AOF. */ * not generated from reading an AOF. */
if (listLength(server.monitors) && if (listLength(server.monitors) &&
!server.loading && !server.loading &&
!(c->cmd->flags & REDIS_CMD_SKIP_MONITOR)) !(c->cmd->flags & (REDIS_CMD_SKIP_MONITOR|REDIS_CMD_ADMIN)))
{ {
replicationFeedMonitors(c,server.monitors,c->db->id,c->argv,c->argc); replicationFeedMonitors(c,server.monitors,c->db->id,c->argv,c->argc);
} }
......
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