KEYCLOAK-14178 Disable erroneous HTML escaping in ResteasyServlet configuration in KeycloakServer

- Removed duplicate servlet configuration: the HttpServlet30Dispatcher servlet is already configured by server.undertowDeployment(deployment, "");
- Disabled the  HTML escaping in the ResteasyDeployment
This commit is contained in:
Thomas Darimont 2020-05-15 18:35:04 +02:00 committed by Hynek Mlnařík
parent e11f1698e9
commit 87dd143452

View file

@ -401,16 +401,11 @@ public class KeycloakServer {
di.setDefaultServletConfig(new DefaultServletConfig(true));
ServletInfo restEasyDispatcher = Servlets.servlet("Keycloak REST Interface", HttpServlet30Dispatcher.class);
restEasyDispatcher.addInitParam(ResteasyContextParameters.RESTEASY_SERVLET_MAPPING_PREFIX, "/");
restEasyDispatcher.addInitParam(ResteasyContextParameters.RESTEASY_DISABLE_HTML_SANITIZER, "true");
restEasyDispatcher.setAsyncSupported(true);
di.addServlet(restEasyDispatcher);
// Note that the ResteasyServlet is configured via server.undertowDeployment(...);
// KEYCLOAK-14178
deployment.setProperty(ResteasyContextParameters.RESTEASY_DISABLE_HTML_SANITIZER, true);
FilterInfo filter = Servlets.filter("SessionFilter", TestKeycloakSessionServletFilter.class);
filter.setAsyncSupported(true);
di.addFilter(filter);