Skip to content

Commit

Permalink
Use yaml.safe_load for untrusted yaml input (#651)
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas authored and nuclearsandwich committed Jan 24, 2019
1 parent 30a631f commit 38a839f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rosdep2/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def load_rosdep_yaml(self, yaml_contents, origin):
:raises: :exc:`yaml.YAMLError`
"""
try:
return yaml.load(yaml_contents)
return yaml.safe_load(yaml_contents)
except yaml.YAMLError as e:
raise InvalidData('Invalid YAML in [%s]: %s' % (origin, e), origin=origin)

Expand Down

0 comments on commit 38a839f

Please sign in to comment.