Skip to content

Commit a022b90

Browse files
committed
update
1 parent 7c7555c commit a022b90

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

modules/openapi-generator/src/main/resources/python/api_client.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ class ApiClient:
724724
content_disposition
725725
)
726726
assert m is not None, "Unexpected 'content-disposition' header value"
727-
filename = os.path.basename(m.group(1)) # Strip any directory traversal
727+
filename = m.group(1)
728728
path = os.path.join(os.path.dirname(path), filename)
729729

730730
with open(path, "wb") as f:

samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent/openapi_client/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ def __deserialize_file(self, response):
708708
content_disposition
709709
)
710710
assert m is not None, "Unexpected 'content-disposition' header value"
711-
filename = os.path.basename(m.group(1)) # Strip any directory traversal
711+
filename = m.group(1)
712712
path = os.path.join(os.path.dirname(path), filename)
713713

714714
with open(path, "wb") as f:

samples/client/echo_api/python/openapi_client/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ def __deserialize_file(self, response):
708708
content_disposition
709709
)
710710
assert m is not None, "Unexpected 'content-disposition' header value"
711-
filename = os.path.basename(m.group(1)) # Strip any directory traversal
711+
filename = m.group(1)
712712
path = os.path.join(os.path.dirname(path), filename)
713713

714714
with open(path, "wb") as f:

samples/openapi3/client/petstore/python-aiohttp/petstore_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ def __deserialize_file(self, response):
717717
content_disposition
718718
)
719719
assert m is not None, "Unexpected 'content-disposition' header value"
720-
filename = os.path.basename(m.group(1)) # Strip any directory traversal
720+
filename = m.group(1)
721721
path = os.path.join(os.path.dirname(path), filename)
722722

723723
with open(path, "wb") as f:

samples/openapi3/client/petstore/python-httpx/petstore_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ def __deserialize_file(self, response):
717717
content_disposition
718718
)
719719
assert m is not None, "Unexpected 'content-disposition' header value"
720-
filename = os.path.basename(m.group(1)) # Strip any directory traversal
720+
filename = m.group(1)
721721
path = os.path.join(os.path.dirname(path), filename)
722722

723723
with open(path, "wb") as f:

samples/openapi3/client/petstore/python-lazyImports/petstore_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ def __deserialize_file(self, response):
714714
content_disposition
715715
)
716716
assert m is not None, "Unexpected 'content-disposition' header value"
717-
filename = os.path.basename(m.group(1)) # Strip any directory traversal
717+
filename = m.group(1)
718718
path = os.path.join(os.path.dirname(path), filename)
719719

720720
with open(path, "wb") as f:

samples/openapi3/client/petstore/python/petstore_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ def __deserialize_file(self, response):
714714
content_disposition
715715
)
716716
assert m is not None, "Unexpected 'content-disposition' header value"
717-
filename = os.path.basename(m.group(1)) # Strip any directory traversal
717+
filename = m.group(1)
718718
path = os.path.join(os.path.dirname(path), filename)
719719

720720
with open(path, "wb") as f:

0 commit comments

Comments
 (0)