Skip to content

Commit 8689499

Browse files
Use yaml.safe_load in check-swagger-sources.py (matrix-org#3719)
1 parent 0d634b1 commit 8689499

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/check-swagger-sources.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def check_response(filepath, request, code, response):
8989

9090
def check_swagger_file(filepath):
9191
with open(filepath) as f:
92-
swagger = yaml.load(f)
92+
swagger = yaml.safe_load(f)
9393

9494
for path, path_api in swagger.get('paths', {}).items():
9595

@@ -162,7 +162,7 @@ def load_file(path):
162162
else:
163163
# We have to assume it's YAML because some of the YAML examples
164164
# do not have file extensions.
165-
return yaml.load(f)
165+
return yaml.safe_load(f)
166166

167167

168168
if __name__ == '__main__':

0 commit comments

Comments
 (0)