[Tickets #3289] NEW: Add more proxy support to IMP Auth
bugs@bugs.horde.org
bugs at bugs.horde.org
Tue Jan 17 20:13:44 PST 2006
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=3289
-----------------------------------------------------------------------
Ticket | 3289
Created By | Eric Rostetter <eric.rostetter at physics.utexas.edu>
Summary | Add more proxy support to IMP Auth
Queue | IMP
Version | HEAD
State | New
Priority | 1. Low
Type | Enhancement
Owners |
-----------------------------------------------------------------------
Eric Rostetter <eric.rostetter at physics.utexas.edu> (2006-01-17 20:13) wrote:
As in Bug #3288, I have my Horde install behind a proxy, so Horde and IMP
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...
More information about the bugs
mailing list