com.ecyrd.jspwiki.filters
Class SpamFilter
java.lang.Object
com.ecyrd.jspwiki.filters.BasicPageFilter
com.ecyrd.jspwiki.filters.SpamFilter
- All Implemented Interfaces:
- PageFilter
public class SpamFilter
- extends BasicPageFilter
A regular expression-based spamfilter that can also do choke modifications.
Parameters:
- wordlist - Page name where the regexps are found. Use [{SET spamwords='regexp list separated with spaces'}] on
that page. Default is "SpamFilterWordList".
- blacklist - The name of an attachment containing the list of spam patterns, one per line
- errorpage - The page to which the user is redirected. Has a special variable $msg which states the reason. Default is "RejectedMessage".
- pagechangesinminute - How many page changes are allowed/minute. Default is 5.
- bantime - How long an IP address stays on the temporary ban list (default is 60 for 60 minutes).
- Since:
- 2.1.112
- Author:
- Janne Jalkanen
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PROP_WORDLIST
public static final String PROP_WORDLIST
- See Also:
- Constant Field Values
PROP_ERRORPAGE
public static final String PROP_ERRORPAGE
- See Also:
- Constant Field Values
PROP_PAGECHANGES
public static final String PROP_PAGECHANGES
- See Also:
- Constant Field Values
PROP_BANTIME
public static final String PROP_BANTIME
- See Also:
- Constant Field Values
PROP_BLACKLIST
public static final String PROP_BLACKLIST
- See Also:
- Constant Field Values
SpamFilter
public SpamFilter()
initialize
public void initialize(Properties properties)
- Description copied from interface:
PageFilter
- Is called whenever the a new PageFilter is instantiated and
reset.
- Specified by:
initialize
in interface PageFilter
- Overrides:
initialize
in class BasicPageFilter
preSave
public String preSave(WikiContext context,
String content)
throws RedirectException
- Description copied from interface:
PageFilter
- This method is called before the page has been saved to the PageProvider.
- Specified by:
preSave
in interface PageFilter
- Overrides:
preSave
in class BasicPageFilter
- Throws:
RedirectException