From 9964c986d9b015e96808908b85cc81fe1fad4594 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 7 Feb 2019 17:30:34 +0100 Subject: [PATCH] SONAR-11680 upgrade Tomcat to 8.5.38 --- pom.xml | 2 +- .../src/main/java/org/sonar/server/app/TomcatConnectors.java | 2 ++ .../src/main/java/org/sonar/server/app/TomcatContexts.java | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 1562dea8ea0..19d4cea92a9 100644 --- a/pom.xml +++ b/pom.xml @@ -81,7 +81,7 @@ 2.8.2 - 8.5.23 + 8.5.38 5.6.3 3.15.0.1256 3.7.0 diff --git a/server/sonar-server/src/main/java/org/sonar/server/app/TomcatConnectors.java b/server/sonar-server/src/main/java/org/sonar/server/app/TomcatConnectors.java index 912bd997184..3b7b37cfb5e 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/app/TomcatConnectors.java +++ b/server/sonar-server/src/main/java/org/sonar/server/app/TomcatConnectors.java @@ -55,6 +55,8 @@ class TomcatConnectors { connector.setURIEncoding("UTF-8"); connector.setProperty("address", props.value("sonar.web.host", "0.0.0.0")); connector.setProperty("socket.soReuseAddress", "true"); + // see https://tomcat.apache.org/tomcat-8.5-doc/config/http.html + connector.setProperty("relaxedQueryChars", "\"<>[\\]^`{|}"); configurePool(props, connector); configureCompression(connector); configureMaxHttpHeaderSize(connector); diff --git a/server/sonar-server/src/main/java/org/sonar/server/app/TomcatContexts.java b/server/sonar-server/src/main/java/org/sonar/server/app/TomcatContexts.java index b6987536e31..1ed4bce2f19 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/app/TomcatContexts.java +++ b/server/sonar-server/src/main/java/org/sonar/server/app/TomcatContexts.java @@ -23,7 +23,6 @@ import com.google.common.annotations.VisibleForTesting; import java.io.File; import java.io.IOException; import java.util.Map; -import javax.servlet.ServletException; import org.apache.catalina.core.StandardContext; import org.apache.catalina.startup.Tomcat; import org.apache.commons.io.FileUtils; @@ -109,7 +108,7 @@ public class TomcatContexts { // disable JSP and WebSocket support context.setContainerSciFilter("org.apache.tomcat.websocket.server.WsSci|org.apache.jasper.servlet.JasperInitializer"); return context; - } catch (ServletException e) { + } catch (Exception e) { throw new IllegalStateException("Fail to configure webapp from " + dir, e); } } -- 2.39.5