URL: https://github.com/freeipa/freeipa/pull/6144 Author: rcritten Title: #6144: [Backport][ipa-4-9] ipatests: webui: Use YAML SafeLoader Action: opened
PR body: """ This PR was opened automatically because PR #6132 was pushed to master and backport to ipa-4-9 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/6144/head:pr6144 git checkout pr6144
From eaab4da1432b8328ec03ec68782780a3893c64d6 Mon Sep 17 00:00:00 2001 From: Michal Polovka <mpolo...@redhat.com> Date: Fri, 7 Jan 2022 12:12:26 +0100 Subject: [PATCH] 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 <mpolo...@redhat.com> --- ipatests/test_webui/ui_driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py index 77fd74e4959..519efee9bba 100644 --- a/ipatests/test_webui/ui_driver.py +++ b/ipatests/test_webui/ui_driver.py @@ -192,7 +192,7 @@ def load_config(cls): 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:
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure