Skip to content

Commit

Permalink
Remove yaml unsafe deprecation warning
Browse files Browse the repository at this point in the history
hides warning such has below in the projects using config-probe.
This will make sure that config-probe uses the safe yaml load version.
I don't see a valid reason to have injected code in your configuration
ifile.

This is a possibly breaking change.

YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated,
as the default Loader is unsafe.

Please read https://msg.pyyaml.org/load for full details.
  • Loading branch information
fbouliane committed Apr 1, 2019
1 parent 8772cd1 commit 684d2f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config_probe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def fake_probe(content):


_parsers = {
".yaml": lambda f: yaml.load(f) or {},
".yaml": lambda f: yaml.safe_load(f) or {},
".json": lambda f: json.load(f),
}

Expand Down

0 comments on commit 684d2f6

Please sign in to comment.