6.0.0-beta1
7/19/25

[#6978] Redirection loop when using $conf[server][change_server]
Summary Redirection loop when using $conf[server][change_server]
Queue IMP
Queue Version 4.2
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester fredrik.poller (at) binero (dot) se
Created 06/26/2008 (6232 days ago)
Due
Updated 09/08/2008 (6158 days ago)
Assigned 09/08/2008 (6158 days ago)
Resolved 09/08/2008 (6158 days ago)
Github Issue Link
Github Pull Request
Milestone 4.2.1
Patch No

History
09/08/2008 10:52:44 PM Michael Rubinsky Taken from Jan Schneider
State ⇒ Resolved
 
09/08/2008 10:52:23 PM CVS Commit Comment #6 Reply to this comment
09/08/2008 10:49:36 PM CVS Commit Comment #5 Reply to this comment
Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/imp/login.php?r1=2.291&r2=2.292&ty=u
09/08/2008 10:33:59 PM Michael Rubinsky Comment #4
State ⇒ Assigned
Assigned to Michael Rubinsky
Reply to this comment
The issue exists only if there is no $credentials['imp'] value set in 
the user's prefs....like if the user never set the pref. (The default 
value for this in prefs.php is the empty string. So, the check for 
$credentials['imp'] will always fail.
08/14/2008 10:45:55 PM Jan Schneider State ⇒ Resolved
 
07/30/2008 10:52:10 PM Jan Schneider Comment #3
State ⇒ Feedback
Reply to this comment
I can no longer reproduce this with a current CVS checkout. This seems 
to have been fixed along the way.
07/06/2008 05:28:39 PM Jan Schneider Milestone ⇒ 4.2.1
 
06/26/2008 09:23:38 AM Jan Schneider Assigned to Jan Schneider
State ⇒ Assigned
 
06/26/2008 08:58:51 AM fredrik (dot) poller (at) binero (dot) se Comment #2 Reply to this comment
It seems that the if on lines 171 - 184 in imp/login.php causes the problem.



If !empty($GLOBALS['conf']['server']['change_server'] (which is true 
in my case) and $credentials['imp'] is set then we're redirected.



Commenting this out solves the problem for me (but it probably breakes 
something else.
06/26/2008 08:36:26 AM fredrik (dot) poller (at) binero (dot) se Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Redirection loop when using $conf[server][change_server]
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
IMP is getting stuck in a redirection loop when loading the login page 
when I use $conf[server][change_server]. Using 
$conf[server][server_list] = 'none' without setting 
$conf[server][change_server] works fine.



Apaches access log contains this:



217.78.41.153 - - [26/Jun/2008:09:18:57 +0200] "GET 
/imp/redirect.php?actionID=login&autologin=1&server_key=imap HTTP/1.1" 
302 38 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE; 
rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14"

217.78.41.153 - - [26/Jun/2008:09:18:57 +0200] "GET 
/imp/redirect.php?actionID=login&autologin=1&server_key=imap HTTP/1.1" 
302 38 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE; 
rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14"

... until browser decides we're stuck in a loop



Hordes log file doesn't tell me anything.



Here's Hordes config directives related to sessions, cookies and auth: 
(if more is needed, let me know)



$conf['use_ssl'] = 0;

$conf['session']['name'] = 'Horde';

$conf['session']['use_only_cookies'] = true; 
$conf['session']['cache_limiter'] = 'nocache'; 
$conf['session']['timeout'] = 0; $conf['cookie']['domain'] = 
'horde.binero.net'; $conf['cookie']['path'] = '/'; 
$conf['auth']['admins'] = array('fredrik.poller@binero.se');

$conf['auth']['checkip'] = true;

$conf['auth']['checkbrowser'] = true;

$conf['auth']['alternate_login'] = false; 
$conf['auth']['redirect_on_logout'] = false; 
$conf['auth']['params']['app'] = 'imp'; $conf['auth']['driver'] = 
'application';



Here's IMPs config directives:



$conf['server']['change_server'] = true; 
$conf['server']['change_port'] = false; 
$conf['server']['change_protocol'] = false; 
$conf['server']['change_smtphost'] = false; 
$conf['server']['change_smtpport'] = false; 
$conf['server']['server_list'] = 'none'; 
$conf['server']['fixed_folders'] = array(); 
$conf['server']['sort_limit'] = 0; $conf['server']['cache_folders'] = 
true; $conf['server']['token_lifetime'] = 1800; 
$conf['server']['cachejs'] = 'none'; $conf['server']['cachecss'] = 
'none';



Servers.php contains this:



$servers['binero'] = array(

     'name' => 'Binero',

     'server' => 'mail.binero.se',

     'hordeauth' => false,

     'protocol' => 'imap/notls',

     'port' => 143,

     'smtphost' => 'localhost',

     'smtpport' => 25,

     'realm' => '',

     'preferred' => '',

);



Versions I’m running:



FreeBSD 7.0

Horde 3.2.1

IMP H3 4.2

Apache 1.3.39

PHP 5.2.5

Saved Queries