Combating Spam

Tags: , May 19, 2005 (3 comments)

Disclaimer: This is deprecated by my key spam plugin (which is no longer maintained).

Stage 1

  1. Open /wp-content/themes/yourtheme/comments.php
  2. Find name="author"
  3. Replace author with any old unlikely string
  4. Make a note of your any old unlikely string
  5. Save and Close /wp-content/themes/yourtheme/comments.php

Stage 2

  1. Open /wp-comments-post.php
  2. Find trim($_POST['author']);
  3. Replace author with your any old unlikely string (must be the same string as in stage 1)
  4. Save and Close /wp-comments-post.php

Comments

  1. Geoffrey Sneddon
    says

    May 20, 2005 01:59:29+01:00

    Just to add - Since I implemented this here, and removed all of the other spam protection methods, I've not got a single spam message through, not even in the moderation queue.

    This is because if the author/email are empty, then wp-comments-post.php just die(); Because all the spam scripts are made to work for $_POST['author'], changing that alone cuts out almost all spam.

  2. Andrew
    says

    May 27, 2005 12:03:09+01:00

    Wouldn't it be pretty easy to make a plugin for this? Have it generate a new random string every time the page loads..maybe not, because wp-comments-post is static. But you could pull off an option query...o god maybe i should just shutup. The more I think about it the dumber it sounds :)

  3. Geoffrey Sneddon
    says

    May 28, 2005 01:35:51+01:00

    Nope, a plugin is impossible... As for making it random, you'd need a hidden <input> to pass it on, which spam bots could read, so no.

Leave a Reply