0
0
Redisquery~20 mins

Rename dangerous commands in Redis - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Redis Command Renamer
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Why rename dangerous Redis commands?
What is the main reason to rename dangerous Redis commands like FLUSHALL or CONFIG in a production environment?
ATo prevent accidental or unauthorized execution that could cause data loss or security issues
BTo improve the performance of Redis commands
CTo enable Redis to run on multiple ports simultaneously
DTo allow Redis commands to be executed faster by the CPU
Attempts:
2 left
💡 Hint
Think about what could happen if someone runs FLUSHALL by mistake.
query_result
intermediate
1:30remaining
Effect of renaming FLUSHALL command
If you rename the FLUSHALL command to DISABLE_FLUSHALL in Redis configuration, what happens when you try to run FLUSHALL?
ARedis executes the flush and deletes all keys
BRedis returns an error saying the command is unknown
CRedis ignores the command and does nothing
DRedis restarts automatically
Attempts:
2 left
💡 Hint
Renaming a command means the original name no longer exists.
📝 Syntax
advanced
2:00remaining
Correct syntax to rename CONFIG command
Which of the following is the correct way to rename the CONFIG command to DISABLE_CONFIG in the Redis configuration file?
Arename-command CONFIG DISABLE_CONFIG
Brename command CONFIG DISABLE_CONFIG
Crename_command CONFIG DISABLE_CONFIG
Drenamecommand CONFIG DISABLE_CONFIG
Attempts:
2 left
💡 Hint
Check the exact spelling and spacing of the rename command.
optimization
advanced
2:00remaining
Best practice for renaming multiple dangerous commands
You want to rename multiple dangerous commands in Redis to prevent accidental use. Which approach is best?
ARename all commands to the same name to simplify configuration
BDisable all commands by removing them from Redis source code
CRename each dangerous command to a unique, hard-to-guess name in the Redis config file
DDo not rename commands; rely on user training only
Attempts:
2 left
💡 Hint
Think about security and manageability.
🔧 Debug
expert
2:30remaining
Why does renaming a command fail to take effect?
You added rename-command FLUSHDB DISABLE_FLUSHDB to your Redis config file but the FLUSHDB command still works as usual after restart. What is the most likely reason?
AThe command name is case sensitive and must be lowercase
BRedis does not support renaming commands
CThe rename-command line is placed after a conflicting command that overrides it
DThe config file was not saved before restarting Redis
Attempts:
2 left
💡 Hint
Check if your changes were applied after restart.