Unverified Commit ea3bebab authored by Jamie Slome's avatar Jamie Slome Committed by GitHub
Browse files

Merge pull request #1 from Anon-Artist/RCE-fix

Rce fix
parents fbbe14d8 a2d815d0
......@@ -21,7 +21,7 @@ def get_yml_content(file_path):
'''Load yaml file content'''
try:
with open(file_path, 'r') as file:
return yaml.load(file, Loader=yaml.Loader)
return yaml.load(file, Loader=yaml.SafeLoader)
except yaml.scanner.ScannerError as err:
print_error('yaml file format error!')
print_error(err)
......
......@@ -216,7 +216,7 @@ def read_registerd_algo_meta():
config_file = get_registered_algo_config_path()
if os.path.exists(config_file):
with open(config_file, 'r') as f:
config = yaml.load(f, Loader=yaml.Loader)
config = yaml.load(f, Loader=yaml.SafeLoader)
else:
config = defaultdict(list)
for t in ALGO_TYPES:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment