Skip to content

Commit

Permalink
RED-32089 safe load the yaml.
Browse files Browse the repository at this point in the history
According to py-yaml docs, it is not safe to call yaml.load with any data received from an untrusted source.

(cherry picked from commit 91d7495)
  • Loading branch information
Roey Prat committed Sep 26, 2019
1 parent 52aa177 commit fa88894
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion log_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def get_namespace_from_config():
if rc:
return

config = yaml.load(out)
config = yaml.safe_load(out)
current_context = config.get('current-context')
if not current_context:
return
Expand Down

0 comments on commit fa88894

Please sign in to comment.