diff --git a/services/src/main/java/org/keycloak/services/filters/KeycloakSessionServletFilter.java b/services/src/main/java/org/keycloak/services/filters/KeycloakSessionServletFilter.java index ae55eeebfa..431421ed7a 100755 --- a/services/src/main/java/org/keycloak/services/filters/KeycloakSessionServletFilter.java +++ b/services/src/main/java/org/keycloak/services/filters/KeycloakSessionServletFilter.java @@ -27,6 +27,8 @@ public class KeycloakSessionServletFilter implements Filter { @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { + servletRequest.setCharacterEncoding("UTF-8"); + final HttpServletRequest request = (HttpServletRequest)servletRequest; KeycloakSessionFactory sessionFactory = (KeycloakSessionFactory) servletRequest.getServletContext().getAttribute(KeycloakSessionFactory.class.getName()); diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/undertow/CustomUndertowContainer.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/undertow/CustomUndertowContainer.java index e2dc4dbb8b..1ac7393500 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/undertow/CustomUndertowContainer.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/arquillian/undertow/CustomUndertowContainer.java @@ -6,13 +6,7 @@ import io.undertow.servlet.api.DefaultServletConfig; import io.undertow.servlet.api.DeploymentInfo; import io.undertow.servlet.api.FilterInfo; import io.undertow.servlet.api.ServletInfo; - -import java.util.Collection; -import java.util.Map; -import javax.servlet.DispatcherType; - import org.jboss.arquillian.container.spi.client.container.DeployableContainer; - import org.jboss.arquillian.container.spi.client.container.DeploymentException; import org.jboss.arquillian.container.spi.client.container.LifecycleException; import org.jboss.arquillian.container.spi.client.protocol.ProtocolDescription; @@ -25,10 +19,13 @@ import org.jboss.resteasy.spi.ResteasyDeployment; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.descriptor.api.Descriptor; import org.jboss.shrinkwrap.undertow.api.UndertowWebArchive; -import org.keycloak.services.filters.ClientConnectionFilter; import org.keycloak.services.filters.KeycloakSessionServletFilter; import org.keycloak.services.resources.KeycloakApplication; +import javax.servlet.DispatcherType; +import java.util.Collection; +import java.util.Map; + public class CustomUndertowContainer implements DeployableContainer { protected final Logger log = Logger.getLogger(this.getClass()); @@ -52,10 +49,6 @@ public class CustomUndertowContainer implements DeployableContainer