#37310 [NEW]: Note system: Important spam check missing
| From: | dave@php.net | Date: | Thu, 04 May 2006 14:55:55 +0000 |
| Subject: | #37310 [NEW]: Note system: Important spam check missing | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-31368@lists.php.net to get a copy of this message | ||
From: dave@php.net
Operating system:
PHP version: Irrelevant
PHP Bug Type: Website problem
Bug description: Note system: Important spam check missing
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 bug report at http://bugs.php.net/?id=37310&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37310&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37310&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37310&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37310&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37310&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37310&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37310&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37310&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37310&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37310&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37310&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37310&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37310&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37310&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37310&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37310&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37310&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37310&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37310&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37310&r=mysqlcfg