Summary | Add proxy support to Horde Framework Auth/Auth.php |
Queue | Horde Framework Packages |
Queue Version | HEAD |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | Horde Developers (at) |
Requester | eric.rostetter (at) physics (dot) utexas (dot) edu |
Created | 01/18/2006 (7119 days ago) |
Due | |
Updated | 01/18/2006 (7119 days ago) |
Assigned | 01/18/2006 (7119 days ago) |
Resolved | 01/18/2006 (7119 days ago) |
Milestone | |
Patch | No |
State ⇒ Resolved
State ⇒ Assigned
State ⇒ New
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Add proxy support to Horde Framework Auth/Auth.php
Queue ⇒ Horde Framework Packages
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) {