mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipatests: webui: Use safe-loader for loading YAML configuration file
FullLoader class for YAML loader was introduced in version 5.1 which also deprecated default loader. SafeLoader, however, stays consistent across the versions and brings added security. This fix is necessary as PyYAML > 5.1 is not available in downstream. Related: https://pagure.io/freeipa/issue/9009 Signed-off-by: Michal Polovka <mpolovka@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
325415bb66
commit
ff02041350
@ -191,7 +191,7 @@ class UI_driver:
|
||||
if not NO_YAML and os.path.isfile(path):
|
||||
try:
|
||||
with open(path, 'r') as conf:
|
||||
cls.config = yaml.load(stream=conf, Loader=yaml.FullLoader)
|
||||
cls.config = yaml.safe_load(stream=conf)
|
||||
except yaml.YAMLError as e:
|
||||
pytest.skip("Invalid Web UI config.\n%s" % e)
|
||||
except IOError as e:
|
||||
|
Loading…
Reference in New Issue
Block a user