[Tickets #3288] NEW: Add proxy support to Horde Framework Auth/Auth.php

bugs@bugs.horde.org bugs at bugs.horde.org
Tue Jan 17 20:05:43 PST 2006


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=3288
-----------------------------------------------------------------------
 Ticket             | 3288
 Created By         | Eric Rostetter <eric.rostetter at physics.utexas.edu>
 Summary            | Add proxy support to Horde Framework Auth/Auth.php
 Queue              | Horde Framework Packages
 Version            | HEAD
 State              | New
 Priority           | 1. Low
 Type               | Enhancement
 Owners             | 
-----------------------------------------------------------------------


Eric Rostetter <eric.rostetter at physics.utexas.edu> (2006-01-17 20:05) wrote:

I use a proxy in front of my web mail, so the last_login always shows as the
proxy instead of the user's actual IP.  The following fixes it.  May not be
the best patch, but it works for me...

RCS file: /repository/framework/Auth/Auth.php,v
retrieving revision 1.142.10.19
diff -u -r1.142.10.19 Auth.php
--- Auth.php    1 Jan 2006 21:28:07 -0000       1.142.10.19
+++ Auth.php    18 Jan 2006 04:04:23 -0000
@@ -724,6 +724,8 @@
         // Set the user's last_login information.
         $last_login = array('time' => time(),
                             'host' =>
@gethostbyaddr($_SERVER['REMOTE_ADDR']));
+        if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
+           $last_login->host = $_SERVER['HTTP_X_FORWARDED_FOR'];
         $GLOBALS['prefs']->setValue('last_login', serialize($last_login));
  
         if ($changeRequested) {






More information about the bugs mailing list