diff options
author | Sunder Tattavarada <statta@research.att.com> | 2020-06-18 19:46:13 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-06-18 19:46:13 +0000 |
commit | d17d2bf666685ec41e37467d32bb046724f72d1b (patch) | |
tree | 8bb8b3bc3bb74265036dabc114ef6944d2abbdcf /ecomp-portal-BE-common | |
parent | ed8f6ef8cc3e329243311c5bc13dc302ade44d60 (diff) | |
parent | cfc431ee10a83ccc0a170ec4f8e674f6ccb63a8d (diff) |
Merge "Fixed few security issues from the dependencies"
Diffstat (limited to 'ecomp-portal-BE-common')
3 files changed, 12 insertions, 15 deletions
diff --git a/ecomp-portal-BE-common/pom.xml b/ecomp-portal-BE-common/pom.xml index 36231095..8e89aa2c 100644 --- a/ecomp-portal-BE-common/pom.xml +++ b/ecomp-portal-BE-common/pom.xml @@ -184,17 +184,7 @@ <artifactId>jaxb-api</artifactId> <version>2.4.0-b180830.0359</version> </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter</artifactId> - <version>1.3.1.RELEASE</version> - <exclusions> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>log4j-over-slf4j</artifactId> - </exclusion> - </exclusions> - </dependency> + <!-- Hibernate --> <dependency> <groupId>org.hibernate</groupId> @@ -290,17 +280,17 @@ <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> - <version>2.8.10</version> + <version>2.10.0</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> - <version>2.8.10</version> + <version>2.10.0</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> - <version>2.8.11.4</version> + <version>2.10.0</version> </dependency> <dependency> <groupId>postgresql</groupId> 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 dc652d59..8bf93549 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 @@ -103,9 +103,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; diff --git a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAccessRolesControllerTest.java b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAccessRolesControllerTest.java index 0253afd0..1ac21b68 100644 --- a/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAccessRolesControllerTest.java +++ b/ecomp-portal-BE-common/src/test/java/org/onap/portalapp/portal/controller/ExternalAccessRolesControllerTest.java @@ -662,7 +662,7 @@ public class ExternalAccessRolesControllerTest { Mockito.when(externalAccessRolesService.getApp(mockedRequest.getHeader(uebKey))).thenReturn(applicationList); PortalRestResponse<String> portalRestResponse = null; PortalRestResponse<String> expectedportalRestResponse = new PortalRestResponse<>(); - expectedportalRestResponse.setMessage(null); + expectedportalRestResponse.setMessage("argument \"content\" is null"); expectedportalRestResponse.setResponse("Failed"); expectedportalRestResponse.setStatus(PortalRestStatusEnum.ERROR); Mockito.when(mockedRequest.getHeader("uebkey")).thenReturn(uebKey); |