Giter Site home page Giter Site logo

igniterealtime / openfire-contentfilter-plugin Goto Github PK

View Code? Open in Web Editor NEW
3.0 13.0 6.0 162 KB

Allows admins to configure various actions based on message content

License: Apache License 2.0

HTML 6.91% Java 93.09%
hacktoberfest java openfire xmpp xmpp-server

openfire-contentfilter-plugin's People

Contributors

akrherz avatar dependabot[bot] avatar drencrom avatar dwd avatar fishbowler avatar gregdthomas avatar guusdk avatar jadestorm avatar ryantgraham avatar sco0ter avatar transifex-integration[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openfire-contentfilter-plugin's Issues

Switches back to Allow after server restart

If filter is enabled and one selects to Reject packet and presses Save settings, it preserves such setting. But after server restart it switches to Allow (with a mask) instead of Reject.

Filter Regex persistency

Hello,

I am using the plugin in a docker version of openfire and on container restart the filter regex is reset to default ( the settings are saved and i am using a large regex, 67KB worth of text) . I have a persistent volume for /var/lib/openfire, so that is not the issue....

I have been unable to find where the information is saved.... is it in memory only ? Can we make the regex persistent somehow ?

Thanks,
Adrian

Content Filter filters a notification to admin with the original packet included

...Migrated from Ignite Jira OF-1047...

Ignite Forum Post

When "Include original packet" setting is enabled in Content Match Notification part of Content Filter plugin's settings it then sends multiple notifications to the designated person. It looks like when forbidden pattern is detected it tries to send a notification to admin and as original packet includes forbidden content it then tries to reject it again and goes into loop. So admin gets this:

Disallowed content detected in message from:wroot to:test@wroot, message was rejected.
Original subject:Content filter notification! (null)
Original content:Disallowed content detected in message from:wroot to:test@wroot, message was rejected.
Original subject:Content filter notification! (null)
<<<1000+ same two lines as above>>>
Original content:Disallowed content detected in message from:wroot to:test@wroot, message was rejected.
Original subject:Content filter notification! (john)
Original content:Disallowed content detected in message from:john@wroot/Exodus to:nova@wroot, message was rejected.
Original subject:
Original content:dog

When it should only be:
Original content:Disallowed content detected in message from:john@wroot/Exodus to:nova@wroot, message was rejected.
Original subject:
Original content:dog

Migrate to SystemProperties

This plugin still uses the old JiveGlobals method of defining/storing/retrieving global configuration.

SystemProperties enable description, visible defaults, change detection and other benefits. Update the plugin to use these instead.

An error occurred during package with openfire 4.7.5

contentFilter 1.8.1 with openfire 4.7.5

  • jdk 1.8
    pom.xml update as follow:
    <parent>
        <artifactId>plugins</artifactId>
        <groupId>org.igniterealtime.openfire</groupId>
        <version>4.7.5</version>
    </parent>

package failed log :

[INFO] At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[WARNING] org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [9] in the generated java file: [D:\Openfire-4.7.5\plugins\openfire-contentFilter-plugin-1.8.1\target\classes\org\jivesoftware\openfire\plugin\contentFilter\contentfilter_002dprops_002dedit_002dform_jsp.java]
The package org.jivesoftware.openfire.plugin.contentFilter collides with a type

contentfilter_002dprops_002dedit_002dform_jsp.java

/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: JspC/ApacheTomcat8
 * Generated at: 2023-10-23 10:23:58 UTC
 * Note: The last modified time of this file was set to
 *       the last modified time of the source file after
 *       generation to assist with modification tracking.
 */
package org.jivesoftware.openfire.plugin.contentFilter;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.user.*;
import org.jivesoftware.openfire.plugin.ContentFilterPlugin;
import org.jivesoftware.util.*;
import java.util.regex.Pattern;
public final class contentfilter_002dprops_002dedit_002dform_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent,
                 org.apache.jasper.runtime.JspSourceImports {

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

  static {
_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(3);
    _jspx_dependants.put("jar:file:/C:/Users/Admin/.m2/repository/org/apache/taglibs/taglibs-standard-impl/1.2.5/taglibs-standard-impl-1.2.5.jar!/META-INF/fmt.tld", Long.valueOf(1425949870000L));
    _jspx_dependants.put("file:/C:/Users/Admin/.m2/repository/org/apache/taglibs/taglibs-standard-impl/1.2.5/taglibs-standard-impl-1.2.5.jar", Long.valueOf(1696919848625L));
   _jspx_dependants.put("jar:file:/C:/Users/Admin/.m2/repository/org/apache/taglibs/taglibs-standard-impl/1.2.5/taglibs-standard-impl-1.2.5.jar!/META-INF/c.tld", Long.valueOf(1425949870000L));
  }

.....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.