How to Prevent Spam trackbacks

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
PurpleCow
Regular
Posts: 64
Joined: Sun Jan 30, 2005 11:25 am
Contact:

How to Prevent Spam trackbacks

Post by PurpleCow »

Hi,

I am getting more than 25 spam trackbacks every minute and this is causing a huge load on my shared hosting account and sometimes, my admin is suspending the hosting account.

How can i disable trackback
How can I delete all the existing trackbacks from the database?
Also, i can prevent spam trackback.

I am using 0.8.x version of serendipity.

Thank you for any quick help.

Cheers
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: How to Prevent Spam trackbacks

Post by garvinhicking »

Hi!

The only way to get low traffic is to edit your comment.php and insert this:

Code: Select all

if ($_REQUEST['type'] == 'trackback') die('Disabled');
after the first <?php.
How can I delete all the existing trackbacks from the database?
MySQL: DELETE * FROM serendipity_comments WHERE type = 'TRACKBACK';
Also, i can prevent spam trackback.
Yes, by using the spamblock event plugin. However if you use the PHP code from above, all trackbacks will be disabled.
I am using 0.8.x version of serendipity.
Your serendipity version might contain security issues, please read the 'Security' section on blog.s9y.org to see if you require an upgrade.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
PurpleCow
Regular
Posts: 64
Joined: Sun Jan 30, 2005 11:25 am
Contact:

Post by PurpleCow »

Hi,

I tried to runt his query from my phpmyadmin,
DELETE * FROM serendipity_comments WHERE type = 'TRACKBACK';
But i get teh following error...
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM serendipity_comments WHERE type = 'TRACKBACK'' at line 1
Any help greatly appreciated.

Thanks
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Oh, sorry. The query would need to read:
DELETE FROM serendipity_comments WHERE type = 'TRACKBACK';
:)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
PurpleCow
Regular
Posts: 64
Joined: Sun Jan 30, 2005 11:25 am
Contact:

Post by PurpleCow »

gravin...

Looks like the new query worked.

But, I got the following warning message in my phpmyadmin when teh query was executed.
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/header_meta_style.inc.php:27) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/common.lib.php on line 1154
I hope this warning is not going to cause any further problems to me.

Thank you for any help on that warning message.

Cheers
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Hm, might be an issue in the phpMyAdmin code, but shouldn't create any problems for you!

It's only a duplicate message - did you check if the comments table shrunk in size?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
PurpleCow
Regular
Posts: 64
Joined: Sun Jan 30, 2005 11:25 am
Contact:

Post by PurpleCow »

gravin...

I did'nt take note of the table sizes before and after.

However when I checked my serendipity admin section for trackbacks, all the 800K spam tracks were removed. does this mean the db size also was adjusted?

Thanks
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Yes, then this will have worked properly :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply