Skip to content

Commit

Permalink
python - load yaml config with safe_load()
Browse files Browse the repository at this point in the history
We can trust the content of the config files but we use safe_load() to prevent config
errors.
  • Loading branch information
phibos committed Sep 13, 2018
1 parent 09ef8fe commit 8ea553e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/python/dionaea/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def load_config_from_files(filename_patterns):
for filename in glob.glob(filename_pattern):
fp = open(filename)
try:
file_configs = yaml.load(fp)
file_configs = yaml.safe_load(fp)
except yaml.YAMLError as e:
if hasattr(e, 'problem_mark'):
mark = e.problem_mark
Expand Down

0 comments on commit 8ea553e

Please sign in to comment.