diff options
author | P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com> | 2023-07-08 01:05:27 +0300 |
---|---|---|
committer | P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com> | 2023-12-31 16:58:43 +0300 |
commit | 7f53998bd3726c808abf8b0c4950e25db29d9ea2 (patch) | |
tree | 72543541bb498087ff726a8996bddebfe87229ac /meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0009-virtual_media-Fix-for-bmcweb-crash.patch | |
parent | 9ad1806592d6c8e3111b9c26db1882f2af49d64c (diff) | |
download | openbmc-7f53998bd3726c808abf8b0c4950e25db29d9ea2.tar.xz |
Update to internal 1-1.11-1
Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
Diffstat (limited to 'meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0009-virtual_media-Fix-for-bmcweb-crash.patch')
-rw-r--r-- | meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0009-virtual_media-Fix-for-bmcweb-crash.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0009-virtual_media-Fix-for-bmcweb-crash.patch b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0009-virtual_media-Fix-for-bmcweb-crash.patch new file mode 100644 index 000000000..a2a120c22 --- /dev/null +++ b/meta-openbmc-mods/meta-common/recipes-phosphor/interfaces/bmcweb/vm/0009-virtual_media-Fix-for-bmcweb-crash.patch @@ -0,0 +1,47 @@ +From 348186f045f23d59405ac0011e983aea8334598a Mon Sep 17 00:00:00 2001 +From: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> +Date: Thu, 4 May 2023 13:56:27 +0000 +Subject: [PATCH] virtual_media: Fix for bmcweb crash + +This is ported from main line. +https://gerrit.openbmc.org/c/openbmc/bmcweb/+/62593 + +bmcweb crashes when user not providing userName or password while +posting ISO form Redfish. + +This fix provides to avoid bmcweb crash when user try to post ISO images +from Redfish without providing username or password. + +Tested: +Redfish validator passed with this change. +Verified by Posting ISO from Redfish. + +Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> +--- + redfish-core/lib/virtual_media.hpp | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp +index 6dfc726b..838a08b1 100644 +--- a/redfish-core/lib/virtual_media.hpp ++++ b/redfish-core/lib/virtual_media.hpp +@@ -1069,6 +1069,16 @@ inline void requestNBDVirtualMediaRoutes(App& app) + return true; + } + ++ if (!actionParams.userName) ++ { ++ actionParams.userName = ""; ++ } ++ ++ if (!actionParams.password) ++ { ++ actionParams.password = ""; ++ } ++ + // manager is irrelevant for + // VirtualMedia dbus calls + doMountVmLegacy(asyncResp, service, resName, +-- +2.17.1 + |