We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5da74e6 commit 86221f8Copy full SHA for 86221f8
1 file changed
modules/openapi-generator/src/main/resources/python/api_client.mustache
@@ -723,7 +723,7 @@ class ApiClient:
723
content_disposition
724
)
725
assert m is not None, "Unexpected 'content-disposition' header value"
726
- filename = m.group(1)
+ filename = os.path.basename(m.group(1)) # Strip any directory traversal
727
path = os.path.join(os.path.dirname(path), filename)
728
729
with open(path, "wb") as f:
0 commit comments