summaryrefslogtreecommitdiffstats
path: root/sonar-application/src/main
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-10-01 21:33:37 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-10-01 21:33:37 +0200
commit4887d9c4787f4bb4b15ba232d636df5a78e657a6 (patch)
treedca140c8d48129ccee90b139132fd58237528eb8 /sonar-application/src/main
parentd5469bcf74ed60bbe35d5acd3391f5e3882b08d3 (diff)
downloadsonarqube-4887d9c4787f4bb4b15ba232d636df5a78e657a6.tar.gz
sonarqube-4887d9c4787f4bb4b15ba232d636df5a78e657a6.zip
SONAR-4675 allow escaping of slash and backslash in URL
Diffstat (limited to 'sonar-application/src/main')
-rw-r--r--sonar-application/src/main/java/org/sonar/application/Connectors.java1
-rw-r--r--sonar-application/src/main/java/org/sonar/application/EmbeddedTomcat.java4
2 files changed, 5 insertions, 0 deletions
diff --git a/sonar-application/src/main/java/org/sonar/application/Connectors.java b/sonar-application/src/main/java/org/sonar/application/Connectors.java
index f6c8965d166..df945525d14 100644
--- a/sonar-application/src/main/java/org/sonar/application/Connectors.java
+++ b/sonar-application/src/main/java/org/sonar/application/Connectors.java
@@ -39,6 +39,7 @@ class Connectors {
// TODO manage redirects from other ports ?
connector.setPort(props.intOf("sonar.web.port", 9000));
+ connector.setURIEncoding("UTF-8");
configurePool(props, connector);
configureCompression(connector);
tomcat.setConnector(connector);
diff --git a/sonar-application/src/main/java/org/sonar/application/EmbeddedTomcat.java b/sonar-application/src/main/java/org/sonar/application/EmbeddedTomcat.java
index 79d9cef2a56..ab934344ce9 100644
--- a/sonar-application/src/main/java/org/sonar/application/EmbeddedTomcat.java
+++ b/sonar-application/src/main/java/org/sonar/application/EmbeddedTomcat.java
@@ -43,6 +43,10 @@ class EmbeddedTomcat {
throw new IllegalStateException("Tomcat is already started");
}
+ // '%2F' (slash /) and '%5C' (backslash \) are permitted as path delimiters in URLs
+ // See Ruby on Rails url_for
+ System.setProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "true");
+
tomcat = new Tomcat();
// Initialize directories