diff --git a/install_re2o.sh b/install_re2o.sh index e2fc60ac..479eaa43 100755 --- a/install_re2o.sh +++ b/install_re2o.sh @@ -305,6 +305,7 @@ fi echo "Ecriture de settings_local" django_secret_key=$(python -c "import random; print(''.join([random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789%=+') for i in range(50)]))") +aes_key=$(python -c "import random; print(''.join([random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789%=+') for i in range(32)]))") cp re2o/settings_local.example.py re2o/settings_local.py if [ $sql_bdd_type == 1 ] @@ -314,6 +315,7 @@ else sed -i 's/db_engine/django.db.backends.postgresql_psycopg2/g' re2o/settings_local.py fi sed -i 's/SUPER_SECRET_KEY/'"$django_secret_key"'/g' re2o/settings_local.py +sed -i 's/THE_AES_KEY/'"$aes_key"'/g' re2o/settings_local.py sed -i 's/SUPER_SECRET_DB/'"$sql_password"'/g' re2o/settings_local.py sed -i 's/db_name_value/'"$sql_name"'/g' re2o/settings_local.py sed -i 's/db_user_value/'"$sql_login"'/g' re2o/settings_local.py diff --git a/re2o/settings_local.example.py b/re2o/settings_local.example.py index 26c1317d..c541840f 100644 --- a/re2o/settings_local.example.py +++ b/re2o/settings_local.example.py @@ -26,8 +26,8 @@ SECRET_KEY = 'SUPER_SECRET_KEY' DB_PASSWORD = 'SUPER_SECRET_DB' -# AES key for secret key encryption -AES_KEY = 'WHAT_A_WONDERFULL_KEY' +# AES key for secret key encryption length must be a multiple of 16 +AES_KEY = 'THE_AES_KEY' # SECURITY WARNING: don't run with debug turned on in production!