diff options
author | Julien Lancelot <julien.lancelot@gmail.com> | 2013-02-07 15:13:42 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@gmail.com> | 2013-02-07 15:14:02 +0100 |
commit | c2f1b1de11ef071fa40102cacc3a9ba80083fa58 (patch) | |
tree | 746d746325a165e5e77601cef203d95b0791eb69 /sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java | |
parent | 64cdd30bf4c0df7aa871ec24a17987d9565dea75 (diff) | |
download | sonarqube-c2f1b1de11ef071fa40102cacc3a9ba80083fa58.tar.gz sonarqube-c2f1b1de11ef071fa40102cacc3a9ba80083fa58.zip |
SONAR-4012 Missing html escape in project name
Diffstat (limited to 'sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java index 8f6b79364d9..181f7703ab3 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ServerClient.java @@ -24,6 +24,7 @@ import com.google.common.base.Strings; import com.google.common.io.Files; import com.google.common.io.InputSupplier; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; import org.sonar.api.BatchComponent; import org.sonar.api.CoreProperties; @@ -77,8 +78,9 @@ public class ServerClient implements BatchComponent { private InputSupplier<InputStream> doRequest(String pathStartingWithSlash) { Preconditions.checkArgument(pathStartingWithSlash.startsWith("/"), "Path must start with slash /"); + String path = StringEscapeUtils.escapeHtml(pathStartingWithSlash); - URI uri = URI.create(getURL() + pathStartingWithSlash); + URI uri = URI.create(getURL() + path); String login = settings.getProperty(CoreProperties.LOGIN); try { |