public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [edk2-redfish-client][PATCH] Tool/Redfish-Profile-Simulator: fix Werkzeug security issue
@ 2024-05-08  8:09 Nickle Wang via groups.io
  2024-05-09 12:45 ` Chang, Abner via groups.io
  0 siblings, 1 reply; 2+ messages in thread
From: Nickle Wang via groups.io @ 2024-05-08  8:09 UTC (permalink / raw)
  To: devel; +Cc: Abner Chang, Igor Kulchytskyy, Nick Ramirez

Upgrade Werkzeug to version 3.0.3 to address CVE-2024-34069

Signed-off-by: Nickle Wang <nicklew@nvidia.com>
Cc: Abner Chang <abner.chang@amd.com>
Cc: Igor Kulchytskyy <igork@ami.com>
Cc: Nick Ramirez <nramirez@nvidia.com>
---
 Tools/Redfish-Profile-Simulator/redfishProfileSimulator.py | 7 ++++---
 Tools/Redfish-Profile-Simulator/requirements.txt           | 6 ++----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/Tools/Redfish-Profile-Simulator/redfishProfileSimulator.py b/Tools/Redfish-Profile-Simulator/redfishProfileSimulator.py
index 91c792a2b..58697328a 100644
--- a/Tools/Redfish-Profile-Simulator/redfishProfileSimulator.py
+++ b/Tools/Redfish-Profile-Simulator/redfishProfileSimulator.py
@@ -1,6 +1,7 @@
 # Copyright Notice:
 #
 # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 # Copyright Notice:
@@ -89,8 +90,8 @@ class PreconditionRequired(werkzeug.exceptions.HTTPException):
 
 def main(argv):
     #Monkey patch the set_etag() method for conditional request.
-    _old_set_etag = werkzeug.ETagResponseMixin.set_etag
-    @functools.wraps(werkzeug.ETagResponseMixin.set_etag)
+    _old_set_etag = werkzeug.wrappers.Response.set_etag
+    @functools.wraps(werkzeug.wrappers.Response.set_etag)
     def _new_set_etag(self, etag, weak=False):
         # only check the first time through; when called twice
         # we're modifying
@@ -107,7 +108,7 @@ def main(argv):
                 raise NotModified
             flask.g.condtnl_etags_start = False
         _old_set_etag(self, etag, weak)
-    werkzeug.ETagResponseMixin.set_etag = _new_set_etag
+    werkzeug.wrappers.Response.set_etag = _new_set_etag
 
     # set default option args
     rf_profile_path = os.path.abspath("./MockupData/SimpleOcpServerV1")
diff --git a/Tools/Redfish-Profile-Simulator/requirements.txt b/Tools/Redfish-Profile-Simulator/requirements.txt
index 359a81446..83d2d8130 100644
--- a/Tools/Redfish-Profile-Simulator/requirements.txt
+++ b/Tools/Redfish-Profile-Simulator/requirements.txt
@@ -1,5 +1,3 @@
-Werkzeug==0.16
-Jinja2==3.0.3
-itsdangerous==2.0.1
-flask==1.1.1
+Werkzeug>=3.0.3
+flask==3.0.0
 pyOpenSSL
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118664): https://edk2.groups.io/g/devel/message/118664
Mute This Topic: https://groups.io/mt/105977266/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [edk2-devel] [edk2-redfish-client][PATCH] Tool/Redfish-Profile-Simulator: fix Werkzeug security issue
  2024-05-08  8:09 [edk2-devel] [edk2-redfish-client][PATCH] Tool/Redfish-Profile-Simulator: fix Werkzeug security issue Nickle Wang via groups.io
@ 2024-05-09 12:45 ` Chang, Abner via groups.io
  0 siblings, 0 replies; 2+ messages in thread
From: Chang, Abner via groups.io @ 2024-05-09 12:45 UTC (permalink / raw)
  To: Nickle Wang, devel@edk2.groups.io; +Cc: Igor Kulchytskyy, Nick Ramirez

[AMD Official Use Only - General]

Reviewed-by: Abner Chang <abner.chang@amd.com>

> -----Original Message-----
> From: Nickle Wang <nicklew@nvidia.com>
> Sent: Wednesday, May 8, 2024 4:09 PM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; Igor Kulchytskyy
> <igork@ami.com>; Nick Ramirez <nramirez@nvidia.com>
> Subject: [edk2-redfish-client][PATCH] Tool/Redfish-Profile-Simulator: fix
> Werkzeug security issue
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> Upgrade Werkzeug to version 3.0.3 to address CVE-2024-34069
>
> Signed-off-by: Nickle Wang <nicklew@nvidia.com>
> Cc: Abner Chang <abner.chang@amd.com>
> Cc: Igor Kulchytskyy <igork@ami.com>
> Cc: Nick Ramirez <nramirez@nvidia.com>
> ---
>  Tools/Redfish-Profile-Simulator/redfishProfileSimulator.py | 7 ++++---
>  Tools/Redfish-Profile-Simulator/requirements.txt           | 6 ++----
>  2 files changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/Tools/Redfish-Profile-Simulator/redfishProfileSimulator.py
> b/Tools/Redfish-Profile-Simulator/redfishProfileSimulator.py
> index 91c792a2b..58697328a 100644
> --- a/Tools/Redfish-Profile-Simulator/redfishProfileSimulator.py
> +++ b/Tools/Redfish-Profile-Simulator/redfishProfileSimulator.py
> @@ -1,6 +1,7 @@
>  # Copyright Notice:
>  #
>  # Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
> +# Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights
> reserved.
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
>  # Copyright Notice:
> @@ -89,8 +90,8 @@ class
> PreconditionRequired(werkzeug.exceptions.HTTPException):
>
>  def main(argv):
>      #Monkey patch the set_etag() method for conditional request.
> -    _old_set_etag = werkzeug.ETagResponseMixin.set_etag
> -    @functools.wraps(werkzeug.ETagResponseMixin.set_etag)
> +    _old_set_etag = werkzeug.wrappers.Response.set_etag
> +    @functools.wraps(werkzeug.wrappers.Response.set_etag)
>      def _new_set_etag(self, etag, weak=False):
>          # only check the first time through; when called twice
>          # we're modifying
> @@ -107,7 +108,7 @@ def main(argv):
>                  raise NotModified
>              flask.g.condtnl_etags_start = False
>          _old_set_etag(self, etag, weak)
> -    werkzeug.ETagResponseMixin.set_etag = _new_set_etag
> +    werkzeug.wrappers.Response.set_etag = _new_set_etag
>
>      # set default option args
>      rf_profile_path = os.path.abspath("./MockupData/SimpleOcpServerV1")
> diff --git a/Tools/Redfish-Profile-Simulator/requirements.txt b/Tools/Redfish-
> Profile-Simulator/requirements.txt
> index 359a81446..83d2d8130 100644
> --- a/Tools/Redfish-Profile-Simulator/requirements.txt
> +++ b/Tools/Redfish-Profile-Simulator/requirements.txt
> @@ -1,5 +1,3 @@
> -Werkzeug==0.16
> -Jinja2==3.0.3
> -itsdangerous==2.0.1
> -flask==1.1.1
> +Werkzeug>=3.0.3
> +flask==3.0.0
>  pyOpenSSL
> --
> 2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#118765): https://edk2.groups.io/g/devel/message/118765
Mute This Topic: https://groups.io/mt/105977266/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-09 12:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-08  8:09 [edk2-devel] [edk2-redfish-client][PATCH] Tool/Redfish-Profile-Simulator: fix Werkzeug security issue Nickle Wang via groups.io
2024-05-09 12:45 ` Chang, Abner via groups.io

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox