From 7ebba2901a4cd5c4f8b39a2efd451010517406d3 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 4 Dec 2019 20:48:29 -0800 Subject: [PATCH] generate_secrets: Remove unused local_database_password in production. Fixes #13464. Signed-off-by: Anders Kaseorg --- scripts/setup/generate_secrets.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/setup/generate_secrets.py b/scripts/setup/generate_secrets.py index f9ed56dbd7..f8db281335 100755 --- a/scripts/setup/generate_secrets.py +++ b/scripts/setup/generate_secrets.py @@ -26,7 +26,6 @@ CAMO_CONFIG_FILENAME = '/etc/default/camo' AUTOGENERATED_SETTINGS = [ 'avatar_salt', 'initial_password_salt', - 'local_database_password', 'rabbitmq_password', 'shared_secret', 'thumbor_key', @@ -85,6 +84,9 @@ def generate_secrets(development=False): if need_secret(name): add_secret(name, generate_random_token(64)) + if development and need_secret("local_database_password"): + add_secret("local_database_password", generate_random_token(64)) + if need_secret('secret_key'): add_secret('secret_key', generate_django_secretkey())