From d3f294217c45198706b42ebd05683bd012d7ec60 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Thu, 5 Jun 2014 19:47:03 +0800 Subject: [PATCH] close #121 --- shadowsocks/utils.py | 4 ++++ tests/aes.json | 2 +- tests/fastopen.json | 2 +- tests/salsa20.json | 2 +- tests/table.json | 2 +- tests/workers.json | 2 +- 6 files changed, 9 insertions(+), 5 deletions(-) diff --git a/shadowsocks/utils.py b/shadowsocks/utils.py index 66e0dd6..ed95443 100644 --- a/shadowsocks/utils.py +++ b/shadowsocks/utils.py @@ -73,6 +73,10 @@ def check_config(config): if config.get('timeout', 300) > 600: logging.warn('warning: your timeout %d seems too long' % int(config.get('timeout'))) + if config.get('password') in ['mypassword', 'barfoo!']: + logging.error('DON\'T USE DEFAULT PASSWORD! Please change it in your ' + 'config.json!') + exit(1) def get_config(is_local): diff --git a/tests/aes.json b/tests/aes.json index 7c0f8f2..a3d95b9 100644 --- a/tests/aes.json +++ b/tests/aes.json @@ -2,7 +2,7 @@ "server":"127.0.0.1", "server_port":8388, "local_port":1081, - "password":"barfoo!", + "password":"aes_password", "timeout":60, "method":"aes-256-cfb", "local_address":"127.0.0.1", diff --git a/tests/fastopen.json b/tests/fastopen.json index 82a9cb2..f3980b6 100644 --- a/tests/fastopen.json +++ b/tests/fastopen.json @@ -2,7 +2,7 @@ "server":"127.0.0.1", "server_port":8388, "local_port":1081, - "password":"barfoo!", + "password":"fastopen_password", "timeout":60, "method":"aes-256-cfb", "local_address":"127.0.0.1", diff --git a/tests/salsa20.json b/tests/salsa20.json index af1d266..5ca6c45 100644 --- a/tests/salsa20.json +++ b/tests/salsa20.json @@ -2,7 +2,7 @@ "server":"127.0.0.1", "server_port":8388, "local_port":1081, - "password":"barfoo!", + "password":"salsa20_password", "timeout":60, "method":"salsa20-ctr", "local_address":"127.0.0.1", diff --git a/tests/table.json b/tests/table.json index 21cff86..cca6ac2 100644 --- a/tests/table.json +++ b/tests/table.json @@ -2,7 +2,7 @@ "server":"127.0.0.1", "server_port":8388, "local_port":1081, - "password":"barfoo!", + "password":"table_password", "timeout":60, "method":"table", "local_address":"127.0.0.1", diff --git a/tests/workers.json b/tests/workers.json index 35f3962..2015ff6 100644 --- a/tests/workers.json +++ b/tests/workers.json @@ -2,7 +2,7 @@ "server":"127.0.0.1", "server_port":8388, "local_port":1081, - "password":"barfoo!", + "password":"workers_password", "timeout":60, "method":"aes-256-cfb", "local_address":"127.0.0.1",