Support » Plugins and Hacks » Jeff Barr spam hack modification

  • I’m trying to make Jeff Barr’s spam hack case INsensitive.
    I added this line:
    $jeff = strtolower($jeff);
    above these lines in wp-comments-post.php
    $jeff = trim($_POST[’jeff’]);
    if ( ‘Jeff’ != $jeff )
    die("You forgot Jeff’s first name. If you are forgetful, hit Back and try again. “);

    but it still won’t approve the comment if the user enters “JEFF” or “jeff”… What am I doing wrong? Of course I’m using a different verification question — just keeping this example simple.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator James Huff


    I think you just have to add Jeff, jeff, and JEFF as possible answers for the field.

    Duh. I guess that’s another way to go about it. So line 2 should change to this?
    if ( 'Jeff' != $jeff && 'jeff' != $jeff && 'JEFF' != $jeff )

    should be actual ampersands in my last post…

    the proper way:
    if ( ‘jeff’ != strtolower($jeff) )
    I added this as a comment to Jeff’s original post.

    Thanks Kitten. Your comment is where I got the idea for using the strtolower function. But I did not know exactly how to implement it…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Jeff Barr spam hack modification’ is closed to new replies.