diff options
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.java | 2 | ||||
-rw-r--r-- | ecomp-sdk/epsdk-app-os/src/main/java/org/onap/portalapp/filter/SecurityXssFilter.java | 20 |
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 |