diff --git a/cms/envs/yaml_config.py b/cms/envs/yaml_config.py index 96bd8cf80e..3fddb8dda8 100644 --- a/cms/envs/yaml_config.py +++ b/cms/envs/yaml_config.py @@ -129,7 +129,7 @@ LOCAL_LOGLEVEL = 'INFO' # with open(CONFIG_ROOT / CONFIG_PREFIX + "env.yaml") as env_file: - ENV_TOKENS = yaml.load(env_file) + ENV_TOKENS = yaml.safe_load(env_file) ENV_TOKENS = convert_tokens(ENV_TOKENS) @@ -220,7 +220,7 @@ MICROSITE_ROOT_DIR = path(MICROSITE_ROOT_DIR) # with open(CONFIG_ROOT / CONFIG_PREFIX + "auth.yaml") as auth_file: - AUTH_TOKENS = yaml.load(auth_file) + AUTH_TOKENS = yaml.safe_load(auth_file) AUTH_TOKENS = convert_tokens(AUTH_TOKENS) diff --git a/lms/envs/yaml_config.py b/lms/envs/yaml_config.py index c798c3d744..8fc97185a6 100644 --- a/lms/envs/yaml_config.py +++ b/lms/envs/yaml_config.py @@ -161,7 +161,7 @@ if os.environ.get('QUEUE') == 'high_mem': # with open(CONFIG_ROOT / CONFIG_PREFIX + "env.yaml") as env_file: - ENV_TOKENS = yaml.load(env_file) + ENV_TOKENS = yaml.safe_load(env_file) # Works around an Ansible bug ENV_TOKENS = convert_tokens(ENV_TOKENS) @@ -266,7 +266,7 @@ STATIC_ROOT = path(STATIC_ROOT_BASE) # with open(CONFIG_ROOT / CONFIG_PREFIX + "auth.yaml") as auth_file: - AUTH_TOKENS = yaml.load(auth_file) + AUTH_TOKENS = yaml.safe_load(auth_file) # Works around an Ansible bug AUTH_TOKENS = convert_tokens(AUTH_TOKENS)