[geeklog-cvs] geeklog: Don't include X-Originating-IP header in emails sent fr...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Nov 16 12:59:41 EST 2008


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/8ce15670c6c3
changeset: 6474:8ce15670c6c3
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun Nov 16 18:59:26 2008 +0100
description:
Don't include X-Originating-IP header in emails sent from the site's admin area (bug #0000701)

diffstat:

2 files changed, 7 insertions(+), 1 deletion(-)
public_html/docs/history   |    2 ++
public_html/lib-common.php |    6 +++++-

diffs (28 lines):

diff -r c81141899488 -r 8ce15670c6c3 public_html/docs/history
--- a/public_html/docs/history	Sun Nov 16 17:39:54 2008 +0100
+++ b/public_html/docs/history	Sun Nov 16 18:59:26 2008 +0100
@@ -3,6 +3,8 @@
 ??? ??, 2008 (1.5.2)
 ------------
 
+- Don't include X-Originating-IP header in emails sent from the site's admin
+  area (bug #0000701) [Dirk]
 - Display a message when no topics exist and don't let the user enter the story
   editors (bug #0000738) [Dirk]
 - Improved image quality when using gdlib to rescale images. Also added a
diff -r c81141899488 -r 8ce15670c6c3 public_html/lib-common.php
--- a/public_html/lib-common.php	Sun Nov 16 17:39:54 2008 +0100
+++ b/public_html/lib-common.php	Sun Nov 16 18:59:26 2008 +0100
@@ -3273,7 +3273,11 @@
 
     if (!empty($_SERVER['REMOTE_ADDR']) && !empty($_SERVER['SERVER_ADDR']) &&
             ($_SERVER['REMOTE_ADDR'] != $_SERVER['SERVER_ADDR'])) {
-        $headers['X-Originating-IP'] = $_SERVER['REMOTE_ADDR'];
+        $url = COM_getCurrentURL();
+        if (substr($url, 0, strlen($_CONF['site_admin_url']))
+                != $_CONF['site_admin_url']) {
+            $headers['X-Originating-IP'] = $_SERVER['REMOTE_ADDR'];
+        }
     }
 
     $retval = $mailobj->send( $to, $headers, $message );



More information about the geeklog-cvs mailing list