mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-07-05 21:03:14 +03:00
Replace unsafe yaml.Loader in config.from_yaml
As I mentioned in [here](https://github.com/ets-labs/python-dependency-injector/issues/369#issuecomment-764913870), Loader is not safe and can be easily exploited.
This commit is contained in:
parent
349c252b50
commit
2f18e2dce9
|
@ -1336,7 +1336,7 @@ cdef class ConfigurationOption(Provider):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(filepath) as opened_file:
|
with open(filepath) as opened_file:
|
||||||
config = yaml.load(opened_file, yaml.Loader)
|
config = yaml.load(opened_file, yaml.SafeLoader)
|
||||||
except IOError:
|
except IOError:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user