From cfc431ee10a83ccc0a170ec4f8e674f6ccb63a8d Mon Sep 17 00:00:00 2001 From: jz385p Date: Wed, 3 Jun 2020 12:50:14 +0530 Subject: Fixed few security issues from the dependencies Fixed security vulnerable issues Issue-ID: PORTAL-916 Change-Id: Icbc99c29f04f6390ab2903249ce92f25e2fb0fd2 Signed-off-by: jz385p --- .../portalapp/portal/controller/MicroserviceProxyController.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ecomp-portal-BE-common/src/main') diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java index 134d99ef..9b03b46f 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/MicroserviceProxyController.java @@ -105,9 +105,16 @@ public class MicroserviceProxyController extends EPUnRestrictedBaseController { */ private boolean isValidJSON(String response) { try { + if(response != null && !response.isEmpty()) + { final ObjectMapper mapper = new ObjectMapper(); mapper.readTree(response); return true; + } + else + { + return false; + } } catch (IOException e) { logger.debug(EELFLoggerDelegate.debugLogger, "isValidJSON failed", e); return false; -- cgit 1.2.3-korg