Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OF-2600: Upgrade Jetty 9.4.43.v20210629 to 10.0.16 #2188

Merged
merged 7 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<!-- Versions -->
<openfire.version>4.8.0-SNAPSHOT</openfire.version>
<!-- Note; the following jetty.version should be identical to the jetty.version in xmppserver/pom.xml -->
<jetty.version>9.4.43.v20210629</jetty.version>
<jetty.version>10.0.16</jetty.version>
</properties>

<profiles>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@

<!-- Versions -->
<!-- Note; the following jetty.version should be identical to the jetty.version in plugins/pom.xml -->
<jetty.version>9.4.43.v20210629</jetty.version>
<jetty.version>10.0.16</jetty.version>
<standard-taglib.version>1.2.5</standard-taglib.version>
<netty.version>4.1.94.Final</netty.version>
<bouncycastle.version>1.70</bouncycastle.version>
Expand Down
4 changes: 1 addition & 3 deletions xmppserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@
<jspc>
<package>org.jivesoftware.openfire.admin</package>
</jspc>
<sourceVersion>11</sourceVersion>
<targetVersion>11</targetVersion>
<keepSources>true</keepSources>
</configuration>
</execution>
Expand Down Expand Up @@ -266,7 +264,7 @@
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-server</artifactId>
<artifactId>websocket-jetty-server</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
Expand Down
232 changes: 0 additions & 232 deletions xmppserver/src/main/java/org/eclipse/jetty/util/WebAppLoaderFix.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ protected void startup() {

final ConnectionManager connectionManager = XMPPServer.getInstance().getConnectionManager();
final ConnectionConfiguration configuration = connectionManager.getListener( ConnectionType.WEBADMIN, true ).generateConnectionConfiguration();
final SslContextFactory sslContextFactory = new EncryptionArtifactFactory( configuration ).getSslContextFactory();
final SslContextFactory.Server sslContextFactory = new EncryptionArtifactFactory( configuration ).getSslContextFactory();

final HttpConfiguration httpsConfig = new HttpConfiguration();
httpsConfig.setSendServerVersion( false );
Expand Down Expand Up @@ -489,6 +489,7 @@ private void createWebAppContext() {
final List<ContainerInitializer> initializers = new ArrayList<>();
initializers.add(new ContainerInitializer(new JasperInitializer(), null));
context.setAttribute("org.eclipse.jetty.containerInitializers", initializers);
context.setClassLoader(Thread.currentThread().getContextClassLoader());
context.setAttribute(InstanceManager.class.getName(), new SimpleInstanceManager());
context.setConfigurations(new Configuration[]{
new AnnotationConfiguration(),
Expand All @@ -501,7 +502,7 @@ private void createWebAppContext() {
new JettyWebXmlConfiguration()
});
final URL classes = getClass().getProtectionDomain().getCodeSource().getLocation();
context.getMetaData().setWebInfClassesDirs(Collections.singletonList(Resource.newResource(classes)));
context.getMetaData().setWebInfClassesResources(Collections.singletonList(Resource.newResource(classes)));

// The index.html includes a redirect to the index.jsp and doesn't bypass
// the context security when in development mode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,11 @@ public ServletRegistration.Dynamic addServlet( String s, Class<? extends Servlet
return proxy.addServlet( s, aClass );
}

@Override
public ServletRegistration.Dynamic addJspFile(String servletName, String jspFile) {
return proxy.addJspFile(servletName, jspFile);
}

@Override
public <T extends Servlet> T createServlet( Class<T> aClass ) throws ServletException
{
Expand Down Expand Up @@ -382,4 +387,34 @@ public String getVirtualServerName()
{
return proxy.getVirtualServerName();
}

@Override
public int getSessionTimeout() {
return proxy.getSessionTimeout();
}

@Override
public void setSessionTimeout(int sessionTimeout) {
proxy.setSessionTimeout(sessionTimeout);
}

@Override
public String getRequestCharacterEncoding() {
return proxy.getRequestCharacterEncoding();
}

@Override
public void setRequestCharacterEncoding(String encoding) {
proxy.setRequestCharacterEncoding(encoding);
}

@Override
public String getResponseCharacterEncoding() {
return proxy.getResponseCharacterEncoding();
}

@Override
public void setResponseCharacterEncoding(String encoding) {
proxy.setResponseCharacterEncoding(encoding);
}
}
Loading