Skip to content

Commit e5b2cb5

Browse files
committed
run build
./mvnw clean package || exit ./bin/generate-samples.sh ./bin/configs/*.yaml || exit ./bin/utils/export_docs_generators.sh || exi
1 parent 86221f8 commit e5b2cb5

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

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
@@ -706,7 +706,7 @@ def __deserialize_file(self, response):
706706
content_disposition
707707
)
708708
assert m is not None, "Unexpected 'content-disposition' header value"
709-
filename = m.group(1)
709+
filename = os.path.basename(m.group(1)) # Strip any directory traversal
710710
path = os.path.join(os.path.dirname(path), filename)
711711

712712
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
@@ -706,7 +706,7 @@ def __deserialize_file(self, response):
706706
content_disposition
707707
)
708708
assert m is not None, "Unexpected 'content-disposition' header value"
709-
filename = m.group(1)
709+
filename = os.path.basename(m.group(1)) # Strip any directory traversal
710710
path = os.path.join(os.path.dirname(path), filename)
711711

712712
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
@@ -715,7 +715,7 @@ def __deserialize_file(self, response):
715715
content_disposition
716716
)
717717
assert m is not None, "Unexpected 'content-disposition' header value"
718-
filename = m.group(1)
718+
filename = os.path.basename(m.group(1)) # Strip any directory traversal
719719
path = os.path.join(os.path.dirname(path), filename)
720720

721721
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
@@ -715,7 +715,7 @@ def __deserialize_file(self, response):
715715
content_disposition
716716
)
717717
assert m is not None, "Unexpected 'content-disposition' header value"
718-
filename = m.group(1)
718+
filename = os.path.basename(m.group(1)) # Strip any directory traversal
719719
path = os.path.join(os.path.dirname(path), filename)
720720

721721
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
@@ -712,7 +712,7 @@ def __deserialize_file(self, response):
712712
content_disposition
713713
)
714714
assert m is not None, "Unexpected 'content-disposition' header value"
715-
filename = m.group(1)
715+
filename = os.path.basename(m.group(1)) # Strip any directory traversal
716716
path = os.path.join(os.path.dirname(path), filename)
717717

718718
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
@@ -712,7 +712,7 @@ def __deserialize_file(self, response):
712712
content_disposition
713713
)
714714
assert m is not None, "Unexpected 'content-disposition' header value"
715-
filename = m.group(1)
715+
filename = os.path.basename(m.group(1)) # Strip any directory traversal
716716
path = os.path.join(os.path.dirname(path), filename)
717717

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

0 commit comments

Comments
 (0)