Merge pull request #1693 from stianst/fix-umlats
KEYCLOAK-1739 User registration form is not able to process diacritics
This commit is contained in:
commit
2ca3ce2dba
2 changed files with 6 additions and 11 deletions
|
@ -27,6 +27,8 @@ public class KeycloakSessionServletFilter implements Filter {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
||||||
|
servletRequest.setCharacterEncoding("UTF-8");
|
||||||
|
|
||||||
final HttpServletRequest request = (HttpServletRequest)servletRequest;
|
final HttpServletRequest request = (HttpServletRequest)servletRequest;
|
||||||
|
|
||||||
KeycloakSessionFactory sessionFactory = (KeycloakSessionFactory) servletRequest.getServletContext().getAttribute(KeycloakSessionFactory.class.getName());
|
KeycloakSessionFactory sessionFactory = (KeycloakSessionFactory) servletRequest.getServletContext().getAttribute(KeycloakSessionFactory.class.getName());
|
||||||
|
|
|
@ -6,13 +6,7 @@ import io.undertow.servlet.api.DefaultServletConfig;
|
||||||
import io.undertow.servlet.api.DeploymentInfo;
|
import io.undertow.servlet.api.DeploymentInfo;
|
||||||
import io.undertow.servlet.api.FilterInfo;
|
import io.undertow.servlet.api.FilterInfo;
|
||||||
import io.undertow.servlet.api.ServletInfo;
|
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.DeployableContainer;
|
||||||
|
|
||||||
import org.jboss.arquillian.container.spi.client.container.DeploymentException;
|
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.container.LifecycleException;
|
||||||
import org.jboss.arquillian.container.spi.client.protocol.ProtocolDescription;
|
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.api.Archive;
|
||||||
import org.jboss.shrinkwrap.descriptor.api.Descriptor;
|
import org.jboss.shrinkwrap.descriptor.api.Descriptor;
|
||||||
import org.jboss.shrinkwrap.undertow.api.UndertowWebArchive;
|
import org.jboss.shrinkwrap.undertow.api.UndertowWebArchive;
|
||||||
import org.keycloak.services.filters.ClientConnectionFilter;
|
|
||||||
import org.keycloak.services.filters.KeycloakSessionServletFilter;
|
import org.keycloak.services.filters.KeycloakSessionServletFilter;
|
||||||
import org.keycloak.services.resources.KeycloakApplication;
|
import org.keycloak.services.resources.KeycloakApplication;
|
||||||
|
|
||||||
|
import javax.servlet.DispatcherType;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class CustomUndertowContainer implements DeployableContainer<CustomUndertowContainerConfiguration> {
|
public class CustomUndertowContainer implements DeployableContainer<CustomUndertowContainerConfiguration> {
|
||||||
|
|
||||||
protected final Logger log = Logger.getLogger(this.getClass());
|
protected final Logger log = Logger.getLogger(this.getClass());
|
||||||
|
@ -52,10 +49,6 @@ public class CustomUndertowContainer implements DeployableContainer<CustomUndert
|
||||||
di.addFilter(filter);
|
di.addFilter(filter);
|
||||||
di.addFilterUrlMapping("SessionFilter", "/*", DispatcherType.REQUEST);
|
di.addFilterUrlMapping("SessionFilter", "/*", DispatcherType.REQUEST);
|
||||||
|
|
||||||
FilterInfo connectionFilter = Servlets.filter("ClientConnectionFilter", ClientConnectionFilter.class);
|
|
||||||
di.addFilter(connectionFilter);
|
|
||||||
di.addFilterUrlMapping("ClientConnectionFilter", "/*", DispatcherType.REQUEST);
|
|
||||||
|
|
||||||
return di;
|
return di;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue