Skip to content

Commit

Permalink
Fix for the Jetty bypass vulnerability fixed in version 9.4.51.v20230…
Browse files Browse the repository at this point in the history
…217 (#506)

Signed-off-by: Scott M Stark <starksm64@gmail.com>
  • Loading branch information
starksm64 authored Nov 13, 2023
1 parent 67416ae commit d2b6b7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion protocols/servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<!-- Properties -->
<properties>
<!-- Versioning -->
<version.jetty_jetty>8.1.2.v20120308</version.jetty_jetty>
<version.jetty_jetty>9.4.51.v20230217</version.jetty_jetty>

</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.NetworkConnector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.jboss.arquillian.container.spi.client.protocol.metadata.HTTPContext;
Expand Down Expand Up @@ -88,7 +91,13 @@ protected HTTPContext createContext() {
}

protected URI createBaseURL() {
return URI.create("http://localhost:" + server.getConnectors()[0].getPort() + "/arquillian-protocol");
int port = 8080;
Connector defaultConn = server.getConnectors()[0];
if (defaultConn instanceof NetworkConnector) {
NetworkConnector net = (NetworkConnector) defaultConn;
port = net.getLocalPort();
}
return URI.create("http://localhost:" + port + "/arquillian-protocol");
}

protected URL createURL(String outputMode, String testClass, String methodName) {
Expand Down

0 comments on commit d2b6b7c

Please # to comment.