After getting far too much comment spam during the last few days, I decided to introduce hopefully effective spam countermeasures to my blog. But at the same time, I wanted the users to lose as little comfort as possible. So I tried to avoid "captchas" as they terrificly infringe accessibility.
Therefore, I tried to find a script being totally out of the visitor's sight, and I did:
But I was forced to modify the original script in some points (if you don't want to read about the modifications but only download the patch, see below):
1. Comment moderation
Usually, the script simply
So I introduced the possibility to have the comments moderated that don't pass the spam test and made this the default.
2. Remote IP vs. session ID
When testing, I realized that any of my comments failed the spam test whereas my brother Jean Pierre didn't have any problems at all. The problem seemed to lie in my computer setup. I found out that the proxy server structure I use to access the internet impacts the IP address seen by the spam script - and thus, a different IP was used for the initial generation of the spam key and the later spam check. Oops. So I made it possible to choose between the remote IP and the session ID as the "key seed" and made the latter the default. Everything works flawlessly now. (Unfortunately, people are supposed to have cookies enabled in their browser, then. If they have not, the comments are moderated automagically (see above), so don't worry ;) ).
I made the modifications to the wp hashcash trunk from Jan 15th, 2005.
If you've already installed the plugin and want to patch it, get the diff file here. Or download the modified version of wp hashcash 1.5 and follow the installation instructions with my PHP file instead.
Happy spam fighting! ;)
P.S.: I will submit my patch to the original development branch. Let's see if it's included soon.