Skip to content

Commit

Permalink
Fix code execution vulnerability by switching to yaml.safe_load
Browse files Browse the repository at this point in the history
  • Loading branch information
ypid committed Feb 21, 2017
1 parent ade5c2b commit 77004f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ansigenome/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ def yaml_load(path, input="", err_quit=False):
"""
try:
if len(input) > 0:
return yaml.load(input)
return yaml.safe_load(input)
elif len(path) > 0:
return yaml.load(file_to_string(path))
return yaml.safe_load(file_to_string(path))
except Exception as err:
file = os.path.basename(path)
ui.error("",
Expand Down

0 comments on commit 77004f6

Please sign in to comment.