[sonic_py_common] replace yaml.load to yaml.safe_load (#14991)
Why I did it replace yaml.load to yaml.safe_load because yaml.safe_load is more secure Work item tracking Microsoft ADO (number only): 15022050 How I did it How to verify it Verified in DUT 201911 which yaml version < 5.1
This commit is contained in:
parent
efeae03ea3
commit
73914e79f7
@ -345,7 +345,7 @@ def get_sonic_version_info():
|
|||||||
if yaml.__version__ >= "5.1":
|
if yaml.__version__ >= "5.1":
|
||||||
sonic_ver_info = yaml.full_load(stream)
|
sonic_ver_info = yaml.full_load(stream)
|
||||||
else:
|
else:
|
||||||
sonic_ver_info = yaml.load(stream)
|
sonic_ver_info = yaml.safe_load(stream)
|
||||||
|
|
||||||
return sonic_ver_info
|
return sonic_ver_info
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user