mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 18:32:00 +00:00
Bug 1469999 - Use yaml.safe_load() for loading linter config file; r=ahal
yaml.load() is unsafe and can lead to arbitrary code execution via syntax like `!!python/object/apply:os.system`. yaml.safe_load() is more reasonable. Differential Revision: https://phabricator.services.mozilla.com/D1738 --HG-- extra : rebase_source : 597c07b3c1538dc27ad6f46e01cdb7f48755d0bc extra : histedit_source : 131d570f8ac1ee047487cba54822dbf20abf6681
This commit is contained in:
parent
871e349399
commit
6e4366049c
@ -90,7 +90,7 @@ class Parser(object):
|
||||
raise LinterParseError(path, "Invalid filename, linters must end with '.yml'!")
|
||||
|
||||
with open(path) as fh:
|
||||
config = yaml.load(fh)
|
||||
config = yaml.safe_load(fh)
|
||||
|
||||
if not config:
|
||||
raise LinterParseError(path, "No lint definitions found!")
|
||||
|
Loading…
x
Reference in New Issue
Block a user