summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-os/src/main/java
diff options
context:
space:
mode:
authorLo, WEI-TING(wl849v) <wl849v@att.com>2018-03-19 17:37:22 -0400
committerLo, WEI-TING(wl849v) <wl849v@att.com>2018-03-19 17:37:22 -0400
commita932df953215fa4fe25d0dee962291eaa64d1846 (patch)
tree5106087e4723b93d6d3690ad37f560f6a7257e31 /ecomp-sdk/epsdk-app-os/src/main/java
parentdcdf1bb1838de59e16c63ab37b29fb913efe2f69 (diff)
Effort to make portal resilient
Issue-ID: PORTAL-210 Includes music library that contatins session management Change-Id: Icacab904e1f948068348fcc19cd77965cb5b446e Signed-off-by: Lo, WEI-TING(wl849v) <wl849v@att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-app-os/src/main/java')
-rw-r--r--ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java2
-rw-r--r--ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java20
2 files changed, 22 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
index 6f3e8f28..9c777b9e 100644
--- a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
+++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java
@@ -41,6 +41,7 @@ import java.util.ArrayList;
import java.util.List;
import org.onap.portalapp.login.LoginStrategyImpl;
+import org.onap.portalapp.music.conf.MusicSessionConfig;
import org.onap.portalapp.scheduler.RegistryAdapter;
import org.onap.portalsdk.core.auth.LoginStrategy;
import org.onap.portalsdk.core.conf.AppConfig;
@@ -75,6 +76,7 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
@Profile("src")
@EnableAsync
@EnableScheduling
+@Import({ MusicSessionConfig.class })
public class ExternalAppConfig extends AppConfig implements Configurable {
private RegistryAdapter schedulerRegistryAdapter;
diff --git a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java
index aad01286..0a1f340d 100644
--- a/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java
+++ b/ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java
@@ -44,6 +44,9 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
import javax.servlet.FilterChain;
import javax.servlet.ReadListener;
@@ -74,8 +77,25 @@ public class SecurityXssFilter extends OncePerRequestFilter {
private ByteArrayOutputStream cachedBytes;
+ private Map parameter = new HashMap();
+
+ @SuppressWarnings("unchecked")
public RequestWrapper(HttpServletRequest request) {
super(request);
+ Enumeration<String> parameterNames = request.getParameterNames();
+ while (parameterNames.hasMoreElements()) {
+ String paramName = parameterNames.nextElement();
+ String paramValue = request.getParameter(paramName);
+ parameter.put(paramName,paramValue);
+ }
+ }
+
+ @Override
+ public String getParameter(String name) {
+ if (parameter != null) {
+ return (String) parameter.get(name);
+ }
+ return null;
}
@Override