#37310 [Opn->Csd]: Note system: Important spam check missing

From: Date: Thu, 04 May 2006 17:01:22 +0000
Subject: #37310 [Opn->Csd]: Note system: Important spam check missing
References: 1  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-31370@lists.php.net to get a copy of this message
ID: 37310 Updated by: nlopess@php.net Reported By: dave@php.net -Status: Open +Status: Closed Bug Type: Website problem PHP Version: Irrelevant New Comment: nice catch Dave! Patch applied, thanks. Previous Comments: ------------------------------------------------------------------------ [2006-05-04 14:55:55] dave@php.net Description: ------------ The most important IP address, $ip, is not processed by the is_spammer() function. Two IPs are currently checked: - $_SERVER['REMOTE_ADDR']: This is almost always a mirror, but sometimes a user so it is still needed. - $redirip: This is supplied by the mirror (or potentially a user) and contains the X-Forwarded-For or Via IP. However, mirrors also provide $ip, which is the direct $_SERVER['REMOTE_ADDR'] from that mirror. This needs to be checked for spammers too! Here's a patch: diff -u -r1.51 user-note.php --- user-note.php 22 Mar 2006 19:20:20 -0000 1.51 +++ user-note.php 4 May 2006 14:51:32 -0000 @@ -50,7 +50,7 @@ die("missing some parameters."); // check if the IP is blacklisted -if (is_spammer($_SERVER['REMOTE_ADDR']) || is_spammer($redirip)) { +if (is_spammer($_SERVER['REMOTE_ADDR']) || is_spammer($ip) || is_spammer($redirip)) { die ('[SPAMMER]'); } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37310&edit=1

« previous php.mirrors (#31370) next »