AntiWikiSpamPlugin
lightweight wiki spam prevention
Stop your wiki getting spammed
This plugin attempts to reduce the instance of Wiki Spam by using the
MoinMoin
AntiSpamGlobalSolution
regex's. Anytime it detects that a saved page contains a string in the regex
list, it
only refuses to save it.
Major premise is not to create any unnecessary load on the server and not to use excess server resources by holding connections open.
All its processing is
only done on
save, or on
attach.
(
Foswiki:Extensions/BlackListPlugin does alot of processing on
every topic operation,
including view)
It uses a timeout on save to check if the list has changed, so if there are no
saves, there is no un-needed network traffic. Alternatively the regex list
can be loaded by a cron script to minimize save overhead.
To manually update the list, click
here
Note that the retrieve of the MoinMoin regex list can still take some seconds
which will delay topic saves when the list needs to be refreshed. For best
performance:
- Refresh the list using the
rest script from a scheduled cron job
cd [foswiki-bin-directory]
./rest /AntiWikiSpamPlugin/forceUpdate
- Set the
GETLISTTIMEOUT to a very large number so that the cron job will be the only source of updates
Configuration
The configuration of this plugin is done using the
http://www.foswiki.org/bin/configure
tool. There are 5 settings used to control the operation and agressiveness of
the spam filter:
| Setting |
Definition |
Default |
{Plugins}{AntiWikiSpamPlugin}{ANTISPAMREGEXLISTURL} |
URL containing the public list of regular expressions used to block spam. The default list is provided by MoinMoin. |
http://arch.thinkmo.de/cgi-bin/spam-merge |
{Plugins}{AntiWikiSpamPlugin}{LOCALANTISPAMREGEXLISTTOPIC} |
A topic containing a list of local regular expressions. A sample topic is provided. |
AntiWikiSpamLocalList? |
{Plugins}{AntiWikiSpamPlugin}{GETLISTTIMEOUT} |
Maximum age of the public regular expression list in minutes. When age is exceeded, an updated list will be fetched |
60 |
{Plugins}{AntiWikiSpamPlugin}{BypassGroup} |
A Wiki group listing members who are permitted to save without any Spam checking. Note that members of the AdminGroup are always permitted to save. |
AntiWikiSpamBypassGroup? |
{Plugins}{AntiWikiSpamPlugin}{HitThreshold} |
Number of regex hits required to block the save. Set to -1 to simulate operation. |
1 |
Installation Instructions
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".
If you have any problems, or if the extension isn't available in
configure, then you can still install manually from the command-line. See
http://foswiki.org/Support/ManuallyInstallingExtensions for more help.
Testing
Edit %SANDBOXWEB%.AntiWikiSpamTestTopic using the Admin user. (This topic is protected against non-admin access.) Save will be permitted, but the matching
regular expressions will be logged to the foswiki error log (typically
working/logs/error.log)
To cause a true failure, remove the VIEW and CHANGE restrictions to the topic and edit it using a non-admin user.
Info