Musings about Coding, Business and other Geek Stuff Live and Direct from somewhere on the planet
March 04, 2004
Quick Fix to Movable Type Comment Spam

I was checking my logs and realized that all the comment spam I was receiving was done using http GET. Thus a quick temporary fix is to disable GET from comment postings as MT’s forms all use POST.

Just insert this little snippet at line 50 of your MT-BIN/lib/MT/App/Comment.pm file, note you can put it really more or less wherever you want in the validation part of the post method. I placed it there as thats before any real heavy work is done:

if ($q->request_method() ne "POST") {
        return $app->handle_error($app->translate("You are not allowed to post comments."));
}

Remember this wont stop spam for ever, it’s more like a temporary bandaid.

Posted by pelleb at March 04, 2004 04:29 PM
This entry was posted in the following Categories: Movable Type
Comments
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?