BlackList

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Goal

Prevent spammers from adding their !@*#% Links on my beautyfull wiki.

Solution

Download Zipfile (I would like to use this file - do not have password. please send to webmaster:societyofcontrol.com - thanks!!)

I am replacing the edit-handle that takes care of the postings. I am checking the new entries for blacklistwords and if it is clear, I am calling the previously declared posthandler. If not, I am aborting.

Discussion

Just include "blacklist.php" in your config.php file or somewhere else where it makes sense. If you call "blackListCheck($text)" it will return the number of banned words.

If you need further blackwords on the list, extend the $BlackList array with further strings. Currently the blacklist contains only links and words from an asian spammer that edited my pages during the last week quite a lot.

See Also

Update other functions that enable you to edit pages.

History

6.9.04: Setting up this page

Comments & Bugs

Maybe it could be worthy to ban the IP that tried to add banned words (if a badwordcount is exceeded for example).

Hello. I replaced the "post" action with "edit" and added it to the pmwiki2 site, at| Cookbook/BlackList. I hope you don't mind. I needed it to try to stop a mat chinese spammer on my side. I'll try to update the 2.0 version when needed.

Contributors

  • Zet

pmwiki-2.3.32 -- Last modified by {{}}?

from IP: 85.171.160.186 ip should be disabled by default for security reasons