Summary | Add more proxy support to IMP Auth |
Queue | IMP |
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 (7157 days ago) |
Due | |
Updated | 01/18/2006 (7157 days ago) |
Assigned | 01/18/2006 (7157 days ago) |
Resolved | 01/18/2006 (7157 days ago) |
Milestone | |
Patch | No |
State ⇒ Resolved
State ⇒ Assigned
State ⇒ New
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Add more proxy support to IMP Auth
Queue ⇒ IMP
Bug #3288, I have my Horde install behind a proxy, so Horde andIMP always pick
up only the proxy address (except for failed logins, where IMP gets
the proxy address also).
The following patch adds the proxy to the login success messages in
addition to the failures.
Again, may not be the best patch, but...
RCS file: /repository/imp/lib/Auth/imp.php,v
retrieving revision 1.16.6.10
diff -u -r1.16.6.10 imp.php
--- imp.php 1 Jan 2006 21:28:56 -0000 1.16.6.10
+++ imp.php 18 Jan 2006 04:07:46 -0000
@@ -79,9 +79,18 @@
require_once IMP_BASE . '/lib/Session.php';
if (IMP_Session::createSession($imapuser, $pass,
$ptr['server'], $ptr)) {
- $entry = sprintf('Login success for %s [%s]
to {%s:%s}',
- $imapuser, $_SERVER['REMOTE_ADDR'],
- $ptr['server'], $ptr['port']);
+ if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
+ $entry = sprintf('Login success for %s [%s]' .
+ ' (forwarded for [%s]) to {%s:%s}',
+ $imapuser, $_SERVER['REMOTE_ADDR'],
+ $_SERVER['HTTP_X_FORWARDED_FOR'],
+ $ptr['server'], $ptr['port']);
+ } else {
+ $entry = sprintf('Login success for %s [%s]' .
+ ' to {%s:%s}',
+ $imapuser, $_SERVER['REMOTE_ADDR'],
+ $ptr['server'], $ptr['port']);
+ }
Horde::logMessage($entry, __FILE__, __LINE__,
PEAR_LOG_NOTICE);
return true;
BTW, both patches work (with line fuzz) with the FRAMEWORK_3 branch also...