Skip to content

Commit

Permalink
Merge pull request igniterealtime#360 from guusdk/remove-unneeded-aut…
Browse files Browse the repository at this point in the history
…hfilter

Remove unneeded authfilter & release
  • Loading branch information
akrherz authored May 23, 2023
2 parents e6ba183 + d0850fd commit 6a38ca3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
5 changes: 3 additions & 2 deletions changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ <h1>
Monitoring Plugin Changelog
</h1>

<p><b>2.4.2</b> -- (tbd)</p>
<p><b>2.5.0</b> -- May 23, 2023</p>
<ul>
<li>Added Ukrainian (uk_UA) created and provided by Yurii Savchuk (svais) and his son Vladislav Savchuk (Bruhmozavr)!</a>
<li>Added Ukrainian (uk_UA) created and provided by Yurii Savchuk (svais) and his son Vladislav Savchuk (Bruhmozavr)!</li>
<li>Remove unused exclusion to authentication filter</li>
</ul>

<p><b>2.4.1</b> -- December 6, 2022</p>
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>Monitors conversations and statistics of the server.</description>
<author>Ignite Realtime</author>
<version>${project.version}</version>
<date>2022-12-06</date>
<date>2023-05-23</date>
<minServerVersion>4.7.0</minServerVersion>
<minJavaVersion>1.8</minJavaVersion>
<databaseKey>monitoring</databaseKey>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</parent>
<groupId>org.igniterealtime.openfire.plugins</groupId>
<artifactId>monitoring</artifactId>
<version>2.4.2-SNAPSHOT</version>
<version>2.5.1-SNAPSHOT</version>
<name>Monitoring Plugin</name>
<description>Monitors conversations and statistics of the server.</description>

Expand Down
20 changes: 1 addition & 19 deletions src/java/org/jivesoftware/openfire/plugin/MonitoringPlugin.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2008 Jive Software, 2022 Ignite Realtime Foundation. All rights reserved.
* Copyright (C) 2008 Jive Software, 2022-2023 Ignite Realtime Foundation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,7 +29,6 @@
import org.eclipse.jetty.apache.jsp.JettyJasperInitializer;
import org.eclipse.jetty.plus.annotation.ContainerInitializer;
import org.eclipse.jetty.webapp.WebAppContext;
import org.jivesoftware.admin.AuthCheckFilter;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.archive.ArchiveIndexer;
import org.jivesoftware.openfire.archive.ArchiveInterceptor;
Expand Down Expand Up @@ -78,11 +77,6 @@ public class MonitoringPlugin implements Plugin, PluginListener
.setPlugin(MonitoringConstants.PLUGIN_NAME)
.build();

private final String[] publicResources = new String[]
{
CONTEXT_ROOT + "/*"
};

private WebAppContext context = null;

private static MonitoringPlugin instance;
Expand Down Expand Up @@ -292,12 +286,6 @@ public void destroyPlugin() {

protected void loadPublicWeb(File pluginDirectory)
{
Log.debug( "Excluding all public resources from the Authorization-Check filter." );
for ( final String publicResource : publicResources )
{
AuthCheckFilter.addExclude(publicResource );
}

Log.debug( "Adding the public web sources to the same context as the one that's providing the BOSH interface." );
context = new WebAppContext( null, pluginDirectory.getPath() + File.separator + "classes/", "/" + CONTEXT_ROOT );
context.setClassLoader( this.getClass().getClassLoader() );
Expand All @@ -320,12 +308,6 @@ protected void unloadPublicWeb()
context.destroy();
context = null;
}

for ( final String publicResource : publicResources )
{
Log.debug( "Removing Authorization-Check filter exemptions." );
AuthCheckFilter.removeExclude( publicResource );
}
}

public ArchiveSearcher getArchiveSearcher() {
Expand Down

0 comments on commit 6a38ca3

Please sign in to comment.