Skip to content

Commit

Permalink
Remove unused authfilter exclusion
Browse files Browse the repository at this point in the history
The web resources exposed by this plugin are exposed on Openfire's public web endpoint (the webbinding one). There is no need to add an explicit exclusion to the filter that governs authentication for the administrative endpoints.
  • Loading branch information
guusdk committed May 19, 2023
1 parent d305cff commit dd98a1f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
5 changes: 5 additions & 0 deletions changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@

<h1>HTTP File Upload Plugin Changelog</h1>

<p><b>1.3.0</b> -- (tbd)</p>
<ul>
<li>Remove unused exclusion to authentication filter</li>
</ul>

<p><b>1.2.2</b> -- (March 5, 2023)</p>
<ul>
<li>CI fixes</li>
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<description>Allows clients to share files, as described in the XEP-0363 'HTTP File Upload' specification.</description>
<author>Guus der Kinderen</author>
<version>${project.version}</version>
<date>2023-03-05</date>
<date>2023-05-19</date>
<minServerVersion>4.7.0</minServerVersion>
</plugin>
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<artifactId>httpfileupload</artifactId>
<name>HTTP File Upload Plugin</name>
<description>Allows clients to share files, as described in the XEP-0363 'HTTP File Upload' specification.</description>
<version>1.2.3-SNAPSHOT</version>
<version>1.3.0-SNAPSHOT</version>

<distributionManagement>
<!-- Repository in which we deploy this project, when desired. -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2022 Ignite Realtime Foundation. All rights reserved.
* Copyright (c) 2017-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 All @@ -26,7 +26,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.component.InternalComponentManager;
import org.jivesoftware.openfire.container.Plugin;
Expand Down Expand Up @@ -146,12 +145,6 @@ public class HttpFileUploadPlugin implements Plugin, PropertyEventListener
private Component component;
private WebAppContext context;

private final String[] publicResources = new String[]
{
"httpfileupload/*",
"httpFileUpload/*"
};

/**
* Returns the scheme that is used in URLs advertised for file uploads/downloads.
*
Expand Down Expand Up @@ -396,11 +389,6 @@ public void initializePlugin( PluginManager manager, File pluginDirectory )
HttpBindManager.getInstance().addJettyHandler( context );

InternalComponentManager.getInstance().addComponent( "httpfileupload", component );

for ( final String publicResource : publicResources )
{
AuthCheckFilter.addExclude( publicResource );
}
}
catch ( Exception e )
{
Expand All @@ -412,11 +400,6 @@ public void initializePlugin( PluginManager manager, File pluginDirectory )
@Override
public void destroyPlugin()
{
for ( final String publicResource : publicResources )
{
AuthCheckFilter.removeExclude( publicResource );
}

if ( context != null )
{
HttpBindManager.getInstance().removeJettyHandler( context );
Expand Down

0 comments on commit dd98a1f

Please sign in to comment.