From 87dd1434520f6b6cebf17d32d769eafe2137c243 Mon Sep 17 00:00:00 2001 From: Thomas Darimont Date: Fri, 15 May 2020 18:35:04 +0200 Subject: [PATCH] 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 --- .../java/org/keycloak/testsuite/KeycloakServer.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/testsuite/utils/src/main/java/org/keycloak/testsuite/KeycloakServer.java b/testsuite/utils/src/main/java/org/keycloak/testsuite/KeycloakServer.java index 1c5b40c23c..89c34b26e8 100755 --- a/testsuite/utils/src/main/java/org/keycloak/testsuite/KeycloakServer.java +++ b/testsuite/utils/src/main/java/org/keycloak/testsuite/KeycloakServer.java @@ -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);