Fix SENTINEL DEBUG with wrong arguments#10258
Conversation
There are two issues in SENTINEL DEBUG: 1. The error message should mention SENTINEL DEBUG 2. Add missing reuturn in args parse. ``` redis> sentinel debug INFO-PERIOD aaa (error) ERR Invalid argument 'aaa' for SENTINEL SET 'INFO-PERIOD' redis> sentinel debug a b c d (error) ERR Unknown option or number of arguments for SENTINEL SET 'a' redis> ping (error) ERR Unknown option or number of arguments for SENTINEL SET 'b' ``` Introduced in redis#9291. Also do some cleanups in the code.
enjoy-binbin
left a comment
There was a problem hiding this comment.
thanks, LGTM, i like the cleanup jobs. i suppose DEBUG command, we can skip the test
now with the cmd->fullname, i suppose we can use it and avoid the hard code "SENTINEL DEBUG"
and i see the code is copy from SENTINEL SET, we can also use the fullname too, if needed (it will need to update the test)
|
ohh i now realize that with |
|
The reasons the DEBUG command got protected are:
for these reasons we wanted to reduce the attack surface for naive users by default. I'm not very keen on the details of SENTINEL DEBUG, i suppose it doesn't fall into the first category, and that it does fall into the second. is that right? @moticless @yossigo please confirm. |
Hi Oran, Sentinel debug command basically used to in the test like what you mentioned above. |
There are two issues in SENTINEL DEBUG:
Introduced in #9291. Also do some cleanups in the code.