mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-07-05 12:53:30 +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:
|
||||
with open(filepath) as opened_file:
|
||||
config = yaml.load(opened_file, yaml.Loader)
|
||||
config = yaml.load(opened_file, yaml.SafeLoader)
|
||||
except IOError:
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user