Fix for segfault in VirtualMedia.InsertMedia

During Virtual Media legacy mount, on URI validation, at some point
boost::urls::result<boost::urls::url_view> object is dereferenced, even
when it is invalid (this can happen after providing wrong external
server in mount configuration). That might eventually cause segmentation
fault and bmcweb service to crash. In this fix the problematic
dereference is substituted with empty boost::urls::url_view object
instead.

Tested:
Manual verification in browser; issue doesn't reproduce anymore.

Change-Id: I2ce8891dcea083bae7be65d37574ac1d56905c77
Signed-off-by: Michal Orzel <michalx.orzel@intel.com>
Signed-off-by: Ed Tanous <edtanous@google.com>
diff --git a/redfish-core/lib/virtual_media.hpp b/redfish-core/lib/virtual_media.hpp
index f56069b..33540ec 100644
--- a/redfish-core/lib/virtual_media.hpp
+++ b/redfish-core/lib/virtual_media.hpp
@@ -416,8 +416,9 @@
         boost::urls::parse_uri(boost::string_view(imageUrl));
     if (!url)
     {
-        messages::resourceAtUriInUnknownFormat(res, *url);
-        return {};
+        messages::actionParameterValueFormatError(res, imageUrl, "Image",
+                                                  "InsertMedia");
+        return false;
     }
     std::optional<TransferProtocol> uriTransferProtocolType =
         getTransferProtocolFromUri(*url);