|
Version 4.10.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SpamDetector
Determine if text is likely spam.
See BuildImpl
for important information on how this item is configured.
BuildImpl.forSpamDetector()
returns the configured implementation of this interface.
Spam refers to unwanted input from undesirable parties (usually advertising of some sort) that is often POSTed to servers using automated means.
Most spam contains links. Implementations are encouraged to detect unwanted links.
The SpamDetectionInFirewall setting in web.xml can instruct the
ApplicationFirewall
to use the configured SpamDetector
to reject all requests containing at least one parameter that appears to be spam.
Such filtering is applied as a
hard validation, and will not result in
a polished response to the end user.
If that policy is felt to be too aggressive, then the only alternative is to check all
items input as text using Check.forSpam()
(usually
in a Model Object constructor). Such checks do not need to be applied to
numeric or date data, since the regular conversion validations done by RequestParser
for
numbers and dates will already detect and reject any spam.
Method Summary | |
---|---|
boolean |
isSpam(String aText)
Determine if the given text is very likely spam. |
Method Detail |
---|
boolean isSpam(String aText)
aText
- value of a request parameter.
|
Version 4.10.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |