powered by Jive Software

Feature request for contentFilter. Whitelist


The contentFilter plug-in today have a combined black- and whitelist. For instance, by specifying

(?!cocktail) (?!cockpit).*c+[^a-z]*o+[^a-z]*c+[^a-z]k+.

you will blacklist all “cock”-ish words like “cock”, “cocksucker”, “cc1oo2cc3kk” and so forth, but leave the friendlier words “cocktail” and “cockpit”.

My problem is that I have a huge blacklist containing several thousands patterns (using another chat-server we are migrating from). The number of whitelisted words are much smaller, but it is still problematic to find what regular expression in the blacklist to pre-fix with the corresponding whitelist word (e.g., you need to find .*c+[^a-z]*o+[^a-z]*c+[^a-z]k+. and add (?!cocktail) (?!cockpit) to it, which is manual and error-prone).

One solution would be to explicitly use blacklist and whitelist. The whitelist will be checked after the current check, and override if matching. Is this something more people would like to see in future releases?

Another questions is regarding the size of the “blacklist”. Is there another limit on it than provided by Java String (e.g., something imposed by the property handling of Openfire.).

Best regards,



I tested the second question (i.e., max.size of the reg-exps that contentFilter read) by generating 1500 random strings (each with 26 characters) and pasting into the “patterns” textbox. I then manually wrote a few extra entries with more normal reg-exps. Saved and logged out, and then logged in again.

The first and last strings in that long comma separated list is filtered as they should. So the max is at least larger than this (40559 characters long, including commas).

The database reports the same length as well: SELECT length(propValue) FROM openfire.ofProperty where name=“plugin.contentFilter.patterns”;

Just FYI this plugin is not in development for many years and its author not seen on these forums either. So, unless someone else digs the source (https://github.com/igniterealtime/Openfire/tree/master/src/plugins/contentFilter) and makes the change this request won’t be addressed. It has only been updated to support newest Openfire versions, but it were probably some trivial changes.

1 Like