diff options
author | Ganesh Nalawade <ganesh634@gmail.com> | 2017-09-15 14:39:16 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 14:39:16 +0530 |
commit | 4f5bf2e08fbbaa0497d54ef08442b80d1c49a021 (patch) | |
tree | 8d5c75d622c02183025478ab55a1919fe7e9871c | |
parent | b4004e50468e9080e0d46fd28c339dcc967ce419 (diff) | |
download | ansible-4f5bf2e08fbbaa0497d54ef08442b80d1c49a021.tar.gz |
Use safe_load to load yaml (#30408)
Replace `yaml.load` with `yaml.safe_load`
(cherry picked from commit 8c3bf20a13a185e7c5c4bd0dee1bbe0b1ec2eab3)
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | lib/ansible/modules/network/aos/aos_blueprint_param.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index db6bb7e4e6..42b7268e0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,8 @@ Ansible Changes By Release * Fix an encoding issue with secret (password) vars_prompts * Fix for Windows become to show the stdout and stderr strings on a failure * Fix the issue SSL verification can not be disabled for Tower modules +* Use safe_load instead on load to read a yaml document + <a id="2.3.2"></a> diff --git a/lib/ansible/modules/network/aos/aos_blueprint_param.py b/lib/ansible/modules/network/aos/aos_blueprint_param.py index 32dda84256..99cbdce1fe 100644 --- a/lib/ansible/modules/network/aos/aos_blueprint_param.py +++ b/lib/ansible/modules/network/aos/aos_blueprint_param.py @@ -201,7 +201,7 @@ def get_collection_from_param_map(module, aos): module.fail_json(msg="Python library Yaml is mandatory to use 'param_map'") try: - param_map = yaml.load(param_map_json) + param_map = yaml.safe_load(param_map_json) except: module.fail_json(msg="Unable to parse param_map information") |