Utility to keep malicious users away from a public TWiki site
This is a simple utility to keep black sheep away from a public TWiki site. The site can be protected against excessive page access (e.g. by bad robots), suspicious activities of users, such as multiple registrations or rapid topic updates indicating Wiki:WikiSpam, or saving text with wiki-spam.
The Plugin monitors activities by IP address and uses three IP address lists to protect the TWiki site:
On topic save, text is compared to a known list of spam patterns. If wiki-spam is identified, topic save is cancelled, an error message is shown, and the IP address is put on the BANLIST. Two wiki-spam lists are used:
Users on the BLACKLIST and BANLIST will get an error message on every page access.
The registration form can also be protected from improper use.
To fight Wiki-spam, the Plugin can also add a rel="nofollow"
parameter to external URLs. Search engines will not follow links that have this parameter, taking away the incentive to add spam to TWiki.
Plugin settings are stored as preferences variables. To reference a plugin setting write %<plugin>_<setting>%
, i.e. %INTERWIKIPLUGIN_SHORTDESCRIPTION%
data/debug.txt
)
<input type="hidden" name="rx" value="%BLACKLISTPLUGIN{ action="magic" }%" />
rel="nofollow"
parameter to external URLs. Use this is to fight Wiki-spam. Search engines will not follow the link if a URL has a nofollow parameter, such as <a href="http://spammer.com/" rel="nofollow">
. Specify topic age in hours for which the nofollow parameter should appear (set it to a value that gives you enough time to remove spam); set it to -1 to add the nofollow parameter unconditionally to external URLs; or 0 to disable: (-1, 0, 1...N)
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
BlackListPlugin.zip
in your twiki installation directory. Content:
File: | Description: |
---|---|
data/TWiki/BlackListPlugin.txt |
Plugin topic |
data/TWiki/BlackListPlugin.txt,v |
Plugin topic repository |
lib/TWiki/Plugins/BlackListPlugin.pm |
Plugin Perl module |
pub/TWiki/BlackListPlugin/.htaccess |
Apache access control to protect pub dir |
templates/oopsblacklist.tmpl |
Generic oops message |
pub/TWiki/BlackListPlugin/
is writable by the CGI user (typically nobody
)
ALLOWTOPICCHANGE = TWikiAdminGroup
setting.
Plugin Author: | TWiki:Main.PeterThoeny![]() |
Copyright: | © 2004-2013 Peter Thoeny, TWiki.org![]() © 2008-2013 TWiki:TWiki.TWikiContributor ![]() |
Plugin Version: | 2013-03-22 |
Change History: | |
2013-03-22: | TWikibug:Item7151![]() |
2013-03-08: | TWikibug:Item7151![]() |
2013-02-28: | TWikibug:Item7154![]() |
2013-02-17: | TWikibug:Item7154![]() |
2011-07-10: | TWikibug:Item6725![]() |
2010-07-10: | TWikibug:Item6519![]() |
29 Mar 2007: | Doc fixes; change view=raw penalty from 20 to 5 |
18 Mar 2007: | Scan for evil script eval() and escape() in topic text and attachments; support for TWiki 4.2 (using new TWiki::Func::getExternalResource ) |
28 Dec 2006: | Fixed bug where EXCLUDELIST pattern was removing only part of a wiki-spam pattern |
27 Dec 2006: | Support for TWiki 4.1 |
01 Jul 2006: | Added EXCLUDELIST; scan for evil script eval in attachments; scan also .js and .css attachments; fixed writeLog error on Cairo |
02 Jun 2006: | Added wiki-spam filtering for HTML attachments to combat TWiki:Codev.HtmlAttachmentSpam![]() |
29 Apr 2006: | Added %BLACKLISTPLUGIN{ action="spam_show_n" }% that shows the local spam list in a shareable format with newline separator |
07 Feb 2006: | TWiki Release 4.0 fix to allow registration with e-mail verification, reset password and approve |
03 Jan 2006: | Filter lines with space from spam list; fixed bug that inproperly filtered HTML from spam list; Dakar Release fix (end/postRenderingHandler issue) |
08 Nov 2005: | Doc fixes; code warning fixes; allow empty local SPAMLIST and public spam list |
04 Nov 2005: | Added registration protection with magic number |
30 Oct 2005: | Dakar Release compatibility: Work around Dakar preferencs bug |
29 Oct 2005: | Added wiki-spam filtering to prevent topic save with wiki-spam |
27 Oct 2005: | For BANLIST, add/remove multiple IP addresses at once, contributed by TWiki:Main.MichaelDaum![]() |
22 Jan 2005: | Added NOFOLLOWAGE handling |
19 Jan 2005: | Added score for "view raw" to address e-mail harvester issue |
05 Apr 2004: | Fixed bug in event log (requiring update of earlier Plugin versions); doc updates |
04 Apr 2004: | Added WHITELIST and BANLIST |
21 Mar 2004: | Initial version |
CPAN Dependencies: | none |
Other Dependencies: | none |
Perl Version: | 5.005 |
License: | GPL ( GNU General Public License![]() |
TWiki:Plugins/Benchmark![]() |
GoodStyle 99%, FormattedSearch 99%, BlackListPlugin 97% |
Plugin Home: | http://TWiki.org/cgi-bin/view/Plugins/BlackListPlugin![]() |
Feedback: | http://TWiki.org/cgi-bin/view/Plugins/BlackListPluginDev![]() |
Appraisal: | http://TWiki.org/cgi-bin/view/Plugins/BlackListPluginAppraisal![]() |