Skip to content

Commit

Permalink
Fix for Cross Site Scripting Rule
Browse files Browse the repository at this point in the history
  • Loading branch information
sumi-mathew authored and sumi committed Nov 13, 2024
1 parent 2d1be02 commit 8104d78
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 3 deletions.
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1411,6 +1411,12 @@
<version>3.6.1</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.14.0</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
Expand Down
1 change: 0 additions & 1 deletion presto-accumulo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>

<dependency>
Expand Down
5 changes: 4 additions & 1 deletion presto-bigquery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.11</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -206,6 +205,10 @@
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf-lite</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
</exclusions>
</dependency>

Expand Down
6 changes: 6 additions & 0 deletions presto-hive-function-namespace/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-llap-common</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
5 changes: 5 additions & 0 deletions presto-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
<artifactId>commons-math3</artifactId>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>

<dependency>
<groupId>com.facebook.presto</groupId>
<artifactId>presto-spi</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.google.common.util.concurrent.ListenableFuture;
import io.airlift.units.DataSize;
import io.airlift.units.Duration;
import org.apache.commons.lang3.StringEscapeUtils;
import org.weakref.jmx.Managed;
import org.weakref.jmx.Nested;

Expand Down Expand Up @@ -116,6 +117,7 @@ protected void doGet(HttpServletRequest request, HttpServletResponse response)
protected void reportFailure(HttpServletResponse response, String message)
throws IOException
{
message = StringEscapeUtils.escapeHtml4(message);
response.sendError(SC_BAD_REQUEST, message);
}

Expand Down Expand Up @@ -181,6 +183,7 @@ public void onError(AsyncEvent event)
{
String errorMessage = format("Server error to process task result request %s : %s", requestURI, event.getThrowable().getMessage());
log.error(event.getThrowable(), errorMessage);
errorMessage = StringEscapeUtils.escapeHtml4(errorMessage);
response.sendError(SC_INTERNAL_SERVER_ERROR, errorMessage);
}

Expand Down
1 change: 0 additions & 1 deletion presto-parquet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
<scope>test</scope>
</dependency>

Expand Down
4 changes: 4 additions & 0 deletions presto-pinot-toolkit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down

0 comments on commit 8104d78

Please sign in to comment.