Contribute  :  Support  :  Downloads  :  Forum  :  Links  :  Polls  :  Calendar  :  Directory  :  Advanced Search  
Geeklog The Ultimate Weblog System
Welcome to Geeklog
Friday, May 16 2008 @ 03:00 AM EDT
   

Anti-spam patch

GeeklogI've got a patch against 1.3.9 to prevent comment spam by counting the number of links in anonymous comments and disallowing the comment if there are more than 2. Logged-in users aren't subject to this restriction. This seems like a very good strategy, and should work much better than IP banning.

http://www.jess2.net/code/geekplugs/antispam.patch.

The patch also enforces a user-configurable delay between hitting 'reply to this' and hitting submit.

Story Options

Anti-spam patch | 8 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Anti-spam patch
Authored by: Dirk on Sunday, May 30 2004 @ 04:28 PM EDT
That probably only helps against a certain type of spam (what if they post only one link?), but it's a start ...

bye, Dirk
Anti-spam patch
Authored by: drkrum on Sunday, May 30 2004 @ 04:48 PM EDT
Agreed, this only stops the sort of spam with lots of links in it, i.e. sites trying to improve their google pagerank. I haven't personally seen any other sorts of comment spam yet, but it's bound to happen.
Anti-spam patch
Authored by: drkrum on Sunday, May 30 2004 @ 04:54 PM EDT
The comment-delay probably conflicts with the one that Vinny checked into CVS, looking at the diff.
Anti-spam patch
Authored by: ByteEnable on Monday, May 31 2004 @ 11:45 AM EDT
I've been getting these spam porn links like crazy too. I banned the IP's. I also moved the time up to a 45 second delay. I check my site often, so, they couldn't post too many before I detect them. It seemed to have angered the person because they came back with a vengence, serveral new IP's at one time, instead of the usual one.

REMOTE_ADDR ^69.5.72.104$
REMOTE_ADDR ^212.21.228.22$
REMOTE_ADDR ^200.58.161.148$
REMOTE_ADDR ^200.41.231.187$
REMOTE_ADDR ^63.171.232.247$
65.64.123.184
200.31.10.19
80.53.234.202
198.26.130.36
61.30.47.21
212.217.52.178
200.69.226.89
200.35.84.45

Byte
www.linuxelectrons.com
Anti-spam patch
Authored by: Dirk on Monday, May 31 2004 @ 12:32 PM EDT
A fixed version of comment.php for 1.3.9 and for 1.3.8-1sr4 should stop the particular sort of spam where anonymous comments are posted even though anonymous comments are disabled in config.php. Proper security updates for Geeklog 1.3.9 and 1.3.8-1sr4 will follow shortly.

Also see this forum thread.

bye, Dirk

Anti-spam patch
Authored by: ByteEnable on Monday, May 31 2004 @ 12:47 PM EDT
I'm running 1.3.9. I also allow anonymous posting. I was just commenting in general on the spammer IP's and my recent battle with him/her.

Byte
Anti-spam patch
Authored by: Dirk on Tuesday, June 01 2004 @ 03:52 AM EDT
We had a few requests for even older versions, so here's the patch for 1.3.7sr5 and even for 1.3.6.

Anyone still running on a version older than 1.3.7sr5 is really asking for trouble, though, and we would strongly advise you to upgrade ASAP.

bye, Dirk

Anti-spam patch
Authored by: ByteEnable on Saturday, June 05 2004 @ 11:56 AM EDT
I've been successful with a patch posted from a previous user. I still allow annonymous comments. This is the only part I use.

// now prevent anonymous posters from submitting comments with too many links.
// this is to prevent spambots from adding comments filled with porn/drug links.
$numLinks = preg_match_all('/href\s*=/i', $comment, $allLinks);
if($numLinks > 2 && $uid == 1) // uid 1 is Anonymous.
{
$retval .= COM_siteHeader()
. COM_startBlock ($LANG12[26], '',
COM_getBlockTemplate ('_msg_block', 'header'))
. $LANG03[31]
. COM_endBlock (COM_getBlockTemplate ('_msg_block', 'footer'))
. COM_siteFooter();
return $retval;
}

Byte