<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Add more proxy support to IMP Auth</title> 
  <pubDate>Fri, 10 Apr 2026 10:04:37 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/3289</link> 
  <atom:link rel="self" type="application/rss+xml" title="Add more proxy support to IMP Auth" href="https://bugs.horde.org/ticket/3289/rss" /> 
  <description>Add more proxy support to IMP Auth</description> 
 
   
   
  <item> 
   <title>As in Bug #3288, I have my Horde install behind a proxy, so </title> 
   <description>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 . &#039;/lib/Session.php&#039;;

                     if (IMP_Session::createSession($imapuser, $pass,

                                                    $ptr[&#039;server&#039;], $ptr)) {

-                        $entry = sprintf(&#039;Login success for %s [%s] to {%s:%s}&#039;,

-                                         $imapuser, $_SERVER[&#039;REMOTE_ADDR&#039;],

-                                         $ptr[&#039;server&#039;], $ptr[&#039;port&#039;]);

+                        if (!empty($_SERVER[&#039;HTTP_X_FORWARDED_FOR&#039;])) {

+                           $entry = sprintf(&#039;Login success for %s [%s]&#039; .

+                              &#039; (forwarded for [%s]) to {%s:%s}&#039;,

+                              $imapuser, $_SERVER[&#039;REMOTE_ADDR&#039;],

+                              $_SERVER[&#039;HTTP_X_FORWARDED_FOR&#039;],

+                              $ptr[&#039;server&#039;], $ptr[&#039;port&#039;]);

+                        } else {

+                           $entry = sprintf(&#039;Login success for %s [%s]&#039; .

+                              &#039; to {%s:%s}&#039;,

+                              $imapuser, $_SERVER[&#039;REMOTE_ADDR&#039;],

+                              $ptr[&#039;server&#039;], $ptr[&#039;port&#039;]);

+                        }

                         Horde::logMessage($entry, __FILE__, __LINE__,

                                           PEAR_LOG_NOTICE);

                         return true;



BTW, both patches work (with line fuzz) with the FRAMEWORK_3 branch also...</description> 
   <pubDate>Wed, 18 Jan 2006 04:13:43 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3289#t15649</link> 
  </item> 
   
  <item> 
   <title>Tweaked and committed, thanks.</title> 
   <description>Tweaked and committed, thanks.</description> 
   <pubDate>Wed, 18 Jan 2006 12:13:20 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/3289#t15663</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
