mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-22 11:23:10 +00:00
Crée la clé AES à l'installation.
This commit is contained in:
parent
668724e5ff
commit
45060e54db
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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!
|
||||
|
|
Loading…
Reference in a new issue