Skip to content

Commit 05f3d74

Browse files
committed
[Dependencies] Upgrade Werkzeug to version 3.1.3 to address CVEs: CVE-2024-34069, CVE-2024-49766, CVE-2024-49767.
Connexion is upgraded to version 3.1.x, as required by the upgraded version of Werkzeug. Signed-off-by: Giacomo Marciani <[email protected]>
1 parent a3dda7d commit 05f3d74

File tree

5 files changed

+15
-13
lines changed

5 files changed

+15
-13
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ CHANGELOG
1414
- gl: `2024.0.1078-1`
1515
- web_viewer: `2024.0-18131-1`
1616
- Upgrade mysql-community-client to version 8.0.39.
17+
- Upgrade Werkzeug to version 3.1.3.
18+
- Upgrade Connexion to version 3.1.x.
1719

1820
**BUG FIXES**
1921
- When mounting an external OpenZFS, it is no longer required to set the outbound rules for ports 111, 2049, 20001, 20002, 20003.

THIRD-PARTY-LICENSES.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@
209209
------
210210

211211
** clickclick; version 20.10.2 -- https://codeberg.org/hjacobs/python-clickclick
212-
** connexion; version 2.13.1 -- https://github.com/zalando/connexion
212+
** connexion; version 3.1.0 -- https://github.com/zalando/connexion
213213
** python-dateutil; version 2.8.2 -- https://github.com/dateutil/dateutil
214214
** constructs; version 3.4.344 -- https://github.com/aws/constructs
215215
** jsii; version 1.85.0 -- https://github.com/aws/jsii
@@ -675,7 +675,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
675675
Copyright 2007 Pallets
676676
** Flask; version 2.2.5 -- https://palletsprojects.com/p/flask
677677
Copyright 2010 Pallets
678-
** Werkzeug; version 2.3.8 -- https://pypi.org/project/Werkzeug/
678+
** Werkzeug; version 3.1.3 -- https://pypi.org/project/Werkzeug/
679679
Copyright 2007 Pallets
680680

681681
Redistribution and use in source and binary forms, with or without

cli/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ aws-cdk.core~=1.164
1616
aws_cdk.aws-cloudwatch~=1.164
1717
aws_cdk.aws-lambda~=1.164
1818
boto3>=1.16.14
19-
connexion~=2.13.0
19+
connexion~=3.1
2020
flask>=2.2.5,<2.3
2121
jinja2~=3.0
2222
jmespath~=0.10
2323
jsii==1.85.0
2424
marshmallow~=3.10
2525
PyYAML>=5.3.1,!=5.4
2626
tabulate>=0.8.8,<=0.8.10
27-
werkzeug~=2.0
27+
werkzeug==3.1.3

cli/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def readme():
4646
"aws-cdk.aws-ssm~=" + CDK_VERSION,
4747
"aws-cdk.aws-sqs~=" + CDK_VERSION,
4848
"aws-cdk.aws-cloudformation~=" + CDK_VERSION,
49-
"werkzeug~=2.0",
50-
"connexion~=2.13.0",
49+
"werkzeug==3.1.3",
50+
"connexion~=3.1",
5151
"flask>=2.2.5,<2.3",
5252
"jmespath~=0.10",
5353
"jsii==1.85.0",

cli/src/pcluster/api/awslambda/serverless_wsgi.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
from werkzeug.datastructures import Headers, MultiDict, iter_multi_items
2222
from werkzeug.http import HTTP_STATUS_CODES
23-
from werkzeug.urls import url_encode, url_unquote, url_unquote_plus
23+
from urllib.parse import urlencode, unquote, unquote_plus
2424
from werkzeug.wrappers import Response
2525

2626
# List of MIME types that should not be base64 encoded. MIME types within `text/*`
@@ -95,8 +95,8 @@ def encode_query_string(event):
9595
if not params:
9696
params = ""
9797
if is_alb_event(event):
98-
params = MultiDict((url_unquote_plus(k), url_unquote_plus(v)) for k, v in iter_multi_items(params))
99-
return url_encode(params)
98+
params = MultiDict((unquote_plus(k), unquote_plus(v)) for k, v in iter_multi_items(params))
99+
return urlencode(params)
100100

101101

102102
def get_script_name(headers, request_context):
@@ -203,7 +203,7 @@ def handle_payload_v1(app, event, context):
203203
environ = {
204204
"CONTENT_LENGTH": str(len(body)),
205205
"CONTENT_TYPE": headers.get("Content-Type", ""),
206-
"PATH_INFO": url_unquote(path_info),
206+
"PATH_INFO": unquote(path_info),
207207
"QUERY_STRING": encode_query_string(event),
208208
"REMOTE_ADDR": event.get("requestContext", {}).get("identity", {}).get("sourceIp", ""),
209209
"REMOTE_USER": event.get("requestContext", {}).get("authorizer", {}).get("principalId", ""),
@@ -247,7 +247,7 @@ def handle_payload_v2(app, event, context):
247247
environ = {
248248
"CONTENT_LENGTH": str(len(body)),
249249
"CONTENT_TYPE": headers.get("Content-Type", ""),
250-
"PATH_INFO": url_unquote(path_info),
250+
"PATH_INFO": unquote(path_info),
251251
"QUERY_STRING": event.get("rawQueryString", ""),
252252
"REMOTE_ADDR": event.get("requestContext", {}).get("http", {}).get("sourceIp", ""),
253253
"REMOTE_USER": event.get("requestContext", {}).get("authorizer", {}).get("principalId", ""),
@@ -295,8 +295,8 @@ def handle_lambda_integration(app, event, context):
295295
environ = {
296296
"CONTENT_LENGTH": str(len(body)),
297297
"CONTENT_TYPE": headers.get("Content-Type", ""),
298-
"PATH_INFO": url_unquote(path_info),
299-
"QUERY_STRING": url_encode(event.get("query", {})),
298+
"PATH_INFO": unquote(path_info),
299+
"QUERY_STRING": urlencode(event.get("query", {})),
300300
"REMOTE_ADDR": event.get("identity", {}).get("sourceIp", ""),
301301
"REMOTE_USER": event.get("principalId", ""),
302302
"REQUEST_METHOD": event.get("method", ""),

0 commit comments

Comments
 (0)