From: kink Date: Tue, 24 Dec 2002 11:23:21 +0000 (+0000) Subject: E_ALL fix when using proxy's with HTTP_VIA and no HTTP_X_FORWARDED_FOR X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=47f06eb38fec389a3ea5980cd808504979d54466;p=squirrelmail.git E_ALL fix when using proxy's with HTTP_VIA and no HTTP_X_FORWARDED_FOR git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4310 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/class/deliver/Deliver.class.php b/class/deliver/Deliver.class.php index 4eeed986..5cd5eb11 100644 --- a/class/deliver/Deliver.class.php +++ b/class/deliver/Deliver.class.php @@ -241,7 +241,7 @@ class Deliver { global $version, $username; $rn = "\r\n"; /* This creates an RFC 822 date */ - $date = date("D, j M Y H:i:s ", mktime()) . $this->timezone(); + $date = date('D, j M Y H:i:s ', mktime()) . $this->timezone(); /* Create a message-id */ $message_id = '<' . $REMOTE_PORT . '.' . $REMOTE_ADDR . '.'; $message_id .= time() . '.squirrel@' . $SERVER_NAME .'>'; @@ -252,7 +252,7 @@ class Deliver { $received_from = $REMOTE_ADDR; } if (isset($HTTP_VIA) || isset ($HTTP_X_FORWARDED_FOR)) { - if ($HTTP_X_FORWARDED_FOR == '') { + if (!isset($HTTP_X_FORWARDED_FOR) || $HTTP_X_FORWARDED_FOR == '') { $HTTP_X_FORWARDED_FOR = 'unknown'; } $received_from .= " (proxying for $HTTP_X_FORWARDED_FOR)";