Use of yaml.SafeLoader instead of yaml.Loader 02/12302/3
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 5 Jul 2022 16:05:04 +0000 (18:05 +0200)
committercalvinosanc1 <guillermo.calvino@canonical.com>
Tue, 15 Nov 2022 15:42:01 +0000 (16:42 +0100)
Change-Id: I11a4775ac657275d14b3d7a76abbefdca5d556f4
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
n2vc/n2vc_conn.py
n2vc/utils.py

index 68e8c14..d38bcad 100644 (file)
@@ -524,4 +524,4 @@ def obj_to_dict(obj: object) -> dict:
     # convert obj to yaml
     yaml_text = obj_to_yaml(obj)
     # parse to dict
-    return yaml.load(yaml_text, Loader=yaml.Loader)
+    return yaml.load(yaml_text, Loader=yaml.SafeLoader)
index 286f0fc..a4a6a23 100644 (file)
@@ -149,7 +149,7 @@ def obj_to_dict(obj: object) -> dict:
     # convert obj to yaml
     yaml_text = obj_to_yaml(obj)
     # parse to dict
-    return yaml.load(yaml_text, Loader=yaml.Loader)
+    return yaml.load(yaml_text, Loader=yaml.SafeLoader)
 
 
 def get_ee_id_components(ee_id: str) -> Tuple[str, str, str]: