From 6f8f97e9d53f6fefaa7e1523fe241617df1f48b4 Mon Sep 17 00:00:00 2001 From: Parshad Patel Date: Tue, 6 Aug 2019 19:41:24 +0900 Subject: Fix sonar issues in portal Use a logger to log this exception Make sure creating this cookie without the "secure" flag is safe here Either re-interrupt this method or rethrow the "InterruptedException" Issue-ID: PORTAL-562 Change-Id: I91d6adce835d9adec4328642e8445f074f7d2d57 Signed-off-by: Parshad Patel --- .../src/main/java/org/onap/portalapp/util/SessionCookieUtil.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ecomp-portal-BE-os') diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java index 6ac63257..eaf9ec19 100644 --- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java +++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/util/SessionCookieUtil.java @@ -69,6 +69,7 @@ public class SessionCookieUtil { HttpServletResponse response) { String jSessionId = getJessionId(request); Cookie cookie1 = new Cookie(EP_SERVICE, jSessionId); + cookie1.setSecure(true); cookie1.setMaxAge(cookieMaxAge); cookie1.setDomain(EPCommonSystemProperties.getProperty(EPCommonSystemProperties.COOKIE_DOMAIN)); cookie1.setPath("/"); @@ -81,6 +82,7 @@ public class SessionCookieUtil { userId = CipherUtil.encrypt(userId, SystemProperties.getProperty(SystemProperties.Decryption_Key)); Cookie cookie1 = new Cookie(USER_ID, userId); + cookie1.setSecure(true); cookie1.setMaxAge(cookieMaxAge); cookie1.setDomain(EPCommonSystemProperties.getProperty(EPCommonSystemProperties.COOKIE_DOMAIN)); cookie1.setPath("/"); -- cgit 1.2.3-korg