WorldWander logo
Main

The Road Behind

Venezuela
Trinidad
Curacao
Galapagos
Ecuador
Peru
Bolivia
Paraguay
Argentina
Chile
Hong Kong
Thailand North
Thailand South
Malaysia
Cambodia
Singapore
Nepal
Kathmandu
Royal Trek
Nepal Trek
India
India Palace
Udaipur
Bangalore
Greece
Islands
Rhodes
Camping
Olympia
Turkey
Istanbul
Bath
Bursa
Cappadocia
Bodrum
South Africa
Garden Route
Cape Town
Namibia
Fish River
Etosha
Botswana
Zimbabwe
Wedding
Great Ruins
Germany
Bathroom
Netherlands
Spain
Madrid
Seville
Granada
Gibraltar
Morocco
Portugal
Sintra
France
Normandy
Egypt
Pyramids
Nile
Aswan
Abusimbel
Luxor
Valley of Kings
Alexandria
Red Sea
Jordan
Kings Valley
Aman
Palestine

The Road Ahead

Isreal
Czech Republic
Austria
Italy
Switzerland
England
Find pages
Unused pages
Undefined pages
Page Index

Set your name in
UserPreferences


Referenced by
FAQAdministration
PageFilters




JSPWiki v2.2.33


SpamFilter


The SpamFilter is a JSPWiki filter that can be used to block questionable edits.

Parameters

wordlist
The name of the WikiPage on which the word list resides. Default is "SpamFilterWordList".
errorpage
The name of the page to which the user is redirected, if the edit contains a matched word. On that page, the variable [{$msg}] is available, telling the reason.
pagechangesinminute
How many page changes are allowed per minute before the IP address is put on a temporary ban list. Default is 5 changes/minute.
bantime
The length of the ban time. Default is "60" for 60 minutes.

The word list

The SpamFilter looks at the WikiVariable called 'spamwords' on the wordlist page. This must contain a space-separated list of words not allowed in a page. In fact, each word is a full Perl5 regular expression, so you can do pretty complex matches as well.

Of course, it is a good idea to allow only trusted users to edit the wordlist page. Otherwise a spammer can remove the list...

Example

Put the following in your filters.xml file (See PageFilter Configuration for more information):

    <filter>
      <class>com.ecyrd.jspwiki.filters.SpamFilter</class>
    </filter>

to start the filter. Create a page called "SpamFilterWordList" and put the following on it:

[{SET spamwords='viagra money'}]
to prevent anyone from saving a page that contains either the word "viagra" or "money". In a bit more complicated example:
[{SET spamwords='[vV][iI][aA][gG][rR][aA]'}]
would block the words "viagra", "Viagra", "viAGra" and so on.


Go to top  
This page last changed on 08-Jun-2005 20:34:26 EDT by unknown.
Please make one.