pixelposeur
06-01-2006, 08:42 PM
One thing I noticed about the comment spam is that it always seems to have the REFERER field set to the image being commented upon.
Normally, when one posts a legitimate comment, the referrer is *not* set.
I added this little check to index.php to reject any comments with the referer field set and it seems to be working. Even with Akismet, some spam was still getting through, this little fix seems to work OK (so far):
I added the check for the referer around lines 923-931 in index.php
// ################################################## ########################################//
// SAVE COMMENT
// ################################################## ########################################//
if(isset($_GET['x']) && $_GET['x'] == "save_comment")
{
/* Reject comment if it came with an HTTP REFERER */
if (isset($_SERVER['HTTP_REFERER'])) {
die('Access denied.');
exit;
}
Others might want to try this out and report how it works in their situation.
The spamming problem has been a huge pain in the butt lately for alot of
people, for sure.
Normally, when one posts a legitimate comment, the referrer is *not* set.
I added this little check to index.php to reject any comments with the referer field set and it seems to be working. Even with Akismet, some spam was still getting through, this little fix seems to work OK (so far):
I added the check for the referer around lines 923-931 in index.php
// ################################################## ########################################//
// SAVE COMMENT
// ################################################## ########################################//
if(isset($_GET['x']) && $_GET['x'] == "save_comment")
{
/* Reject comment if it came with an HTTP REFERER */
if (isset($_SERVER['HTTP_REFERER'])) {
die('Access denied.');
exit;
}
Others might want to try this out and report how it works in their situation.
The spamming problem has been a huge pain in the butt lately for alot of
people, for sure.