This is a very unpolished patch, which basically checks all input against a blacklist file of prohibited patterns to help block wiki spam.#

See also SpamFilter.

I hope to enhance it and package it better in the future. One very important goal is the ability to reload the blacklist file without restarting the webapp.

To use this: get the source from CVS. Add the java file. Apply the patches. Build it. Then configure & deploy like normal. Add jspwiki.TextContentVerifier.enabled = true to jspwiki.properties. A sample blacklist file is attached; put it in WEB-INF right next to jspwiki.properties

Please let me know of any suggestions and improvements. Improve it yourself if you want!

Author: DaveBrondsema


Question: Dave, why didn't you tie it to the PageFilter system?

-- JanneJalkanen

Janne, if I understand correctly, PageFilters modify the display of pages. This checks the text before saving the changes at all --DaveBrondsema

The SpamFilter throws a RedirectException upon save, if a page is deemed not worthy. PageFilters can be used to modify or reject a page on saving as well. --JanneJalkanen


But does it actually work? For instance, if I were to put in something like http://www.vegasonlinesports.com NFL Football Betting, will this be blocked out partially, or entirely?

Thanks

In this case, if the poster is not logged in, you could add a check_poster_is_human step, like YahooGroup does ("enter the text you see in the image").
Obviously, it would only stop automated spammers. --AlainRavet

Yes, it works. If the user enters something that matches a prohibited pattern, an error message explaining that will appear and the new version page will not be saved at all. --DaveBrondsema

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
diff
Edit.jsp.diff 1.8 kB 1 10-Jun-2004 06:05 DaveBrondsema
java
TextContentVerifier.java 3.0 kB 1 10-Jun-2004 06:03 DaveBrondsema
diff
WikiEngine.java.diff 0.6 kB 1 10-Jun-2004 06:06 DaveBrondsema
properties
jspwiki.properties 17.3 kB 1 10-Jun-2004 06:11 DaveBrondsema
properties
prohibited-patterns.properties 9.4 kB 2 13-Jan-2005 04:21 DaveBrondsema
« This page (revision-27) was last changed on 25-Dec-2006 14:48 by 88.211.133.30