| java.lang.Object com.ecyrd.jspwiki.filters.BasicPageFilter com.ecyrd.jspwiki.filters.SpamFilter
SpamFilter | public class SpamFilter extends BasicPageFilter (Code) | | This is Herb, the JSPWiki 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. Default is
"SpamFilterWordList/blacklist.txt"
- 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.
- similarchanges - How many similar page changes are allowed before the host is banned. Default is 2. (since 2.4.72)
- bantime - How long an IP address stays on the temporary ban list (default is 60 for 60 minutes).
- maxurls - How many URLs can be added to the page before it is considered spam (default is 5)
- akismet-apikey - The Akismet API key (see akismet.org)
- ignoreauthenticated - If set to "true", all authenticated users are ignored and never caught in SpamFilter
- captcha - Sets the captcha technology to use. Current allowed values are "none" and "asirra".
- strategy - Sets the filtering strategy to use. If set to "eager", will stop at the first probable
match, and won't consider any other tests. This is the default, as it's considerably lighter. If set to "score", will go through all of the tests
and calculates a score for the spam, which is then compared to a filter level value.
Changes by admin users are ignored in any case.
since: 2.1.112 author: Janne Jalkanen |
PROP_AKISMET_API_KEY | final public static String PROP_AKISMET_API_KEY(Code) | | |
PROP_BLACKLIST | final public static String PROP_BLACKLIST(Code) | | |
PROP_ERRORPAGE | final public static String PROP_ERRORPAGE(Code) | | |
PROP_FILTERSTRATEGY | final public static String PROP_FILTERSTRATEGY(Code) | | |
PROP_IGNORE_AUTHENTICATED | final public static String PROP_IGNORE_AUTHENTICATED(Code) | | |
PROP_PAGECHANGES | final public static String PROP_PAGECHANGES(Code) | | |
PROP_SIMILARCHANGES | final public static String PROP_SIMILARCHANGES(Code) | | |
STRATEGY_EAGER | final public static String STRATEGY_EAGER(Code) | | |
STRATEGY_SCORE | final public static String STRATEGY_SCORE(Code) | | |
spamlog | static Logger spamlog(Code) | | |
checkHash | final public static boolean checkHash(WikiContext context, PageContext pageContext) throws IOException(Code) | | This method checks if the hash value is still valid, i.e. if it exists at all. This
can occur in two cases: either this is a spam bot which is not adaptive, or it is
someone who has been editing one page for too long, and their session has expired.
This method puts a redirect to the http response field to page "SessionExpired"
and logs the incident in the spam log (it may or may not be spam, but it's rather likely
that it is).
Parameters: context - Parameters: pageContext - True, if hash is okay. False, if hash is not okay, and you need to redirect. throws: IOException - If redirection fails since: 2.6 |
getBotFieldName | public static String getBotFieldName()(Code) | | Returns a static string which can be used to detect spambots which
just wildly fill in all the fields.
A string |
getSpamHash | final public static String getSpamHash(WikiPage page, HttpServletRequest request)(Code) | | This method is used to calculate an unique code when submitting the page
to detect edit conflicts. It currently incorporates the last-modified
date of the page, and the IP address of the submitter.
Parameters: page - The WikiPage under edit Parameters: request - The HTTP Request since: 2.6 A hash value for this page and session |
isValidUserProfile | public boolean isValidUserProfile(WikiContext context, UserProfile profile)(Code) | | Checks whether the UserProfile matches certain checks.
Parameters: profile - since: 2.6.1 |
|
|