• Wen Hui's avatar
    Fix the bug that write redis sensitive command information to redis_cli historyfile (#11489) · 28b6155b
    Wen Hui authored
    Currently, we do not write the following sensitive commands into the ~/.rediscli_history file:
    
    ACL SETUSER username [rule [rule ...]]
    AUTH [username] password
    HELLO [AUTH username password] 
    MIGRATE host port <key | ""> destination-db timeout [[AUTH password | AUTH2 username password]]
    CONFIG SET masterauth master-password
    CONFIG SET masteruser username
    CONFIG SET requirepass foobared
    
    However, we still write the following sensitive commands into the ~/.rediscli_history file:
    ACL GETUSER username
    Sentinel CONFIG set sentinel-pass password
    Sentinel CONFIG set sentinel-user username
    Sentinel set mastername auth-pass password
    Sentinel set mastername auth-user username
    
    This change adds the commands of the second list to be skipped from being written to the history file.
    
    28b6155b
redis-cli.c 373 KB