[imp] MIMP Login causing redirect loop

Joel Smith js-horde at jk1.net
Wed Feb 7 20:58:41 PST 2007


Hi,
I'm running MIMP 1.0 and Horde 3.1.3, and I set up the auth driver as
described in the MIMPHowTo page on the wiki.

When I authenticate from a regular browser, I get the IMP login screen,
and I can authenticate successfully.  If I use a WAP mobile browser, I
get the MIMP login screen.  So far, so good.  If I then attempt to
authenticate, my browser gets into a redirect loop.  Here's a relevant
snippet from my apache logs:

10.0.0.100 - - [07/Feb/2007:21:33:28 -0700] "GET /horde3/mimp/ HTTP/1.1"
200 479
10.0.0.100 - - [07/Feb/2007:21:33:29 -0700] "GET
/horde3/mimp/themes/graphics/horde-power2.wbmp HTTP/1.1" 200 345
10.0.0.100 - - [07/Feb/2007:21:33:40 -0700] "POST
/horde3/mimp/redirect.php HTTP/1.1" 302 125
10.0.0.100 - - [07/Feb/2007:21:33:40 -0700] "GET
/horde3/mimp/login.php?server=localhost&port=143&protocol=imap%2Fnotls
HTTP/1.1" 302 38
10.0.0.100 - - [07/Feb/2007:21:33:40 -0700] "GET
/horde3/mimp/mailbox.php HTTP/1.1" 302 5
10.0.0.100 - - [07/Feb/2007:21:33:41 -0700] "GET
/horde3/login.php?url=%2Fhorde3%2Fmimp%2Fmailbox.php&nosidebar=1
HTTP/1.1" 302 38
10.0.0.100 - - [07/Feb/2007:21:33:41 -0700] "GET
/horde3/mimp/login.php?url=%2Fhorde3%2Fmimp%2Fmailbox.php HTTP/1.1" 302 38
10.0.0.100 - - [07/Feb/2007:21:33:41 -0700] "GET
/horde3/mimp/mailbox.php HTTP/1.1" 302 5
10.0.0.100 - - [07/Feb/2007:21:33:42 -0700] "GET
/horde3/login.php?url=%2Fhorde3%2Fmimp%2Fmailbox.php&nosidebar=1
HTTP/1.1" 302 38
10.0.0.100 - - [07/Feb/2007:21:33:42 -0700] "GET
/horde3/mimp/login.php?url=%2Fhorde3%2Fmimp%2Fmailbox.php HTTP/1.1" 302 38
10.0.0.100 - - [07/Feb/2007:21:33:43 -0700] "GET
/horde3/mimp/mailbox.php HTTP/1.1" 302 5

Eventually the browser gives up.  I've tried with a few different
browsers and each exhibited the same symptom.

I turned on debug logging and got the following, sliced down

Feb 07 21:33:28 HORDE [debug] [horde] SQL Query by
SessionHandler_mysql::read(): query = "SELECT session_data FROM
horde_sessionhandler WHERE session_id =
'c280ca0f21b2ece6f576d979c76c7252' AND session_lastmodified > 117073
6408 FOR UPDATE" [on line 105 of
"/usr/share/horde3/lib/Horde/SessionHandler/mysql.php"]
Feb 07 21:33:40 HORDE [debug] [horde] SQL Query by
SessionHandler_mysql::read(): query = "SELECT session_data FROM
horde_sessionhandler WHERE session_id =
'c280ca0f21b2ece6f576d979c76c7252' AND session_lastmodified > 117073
6420 FOR UPDATE" [on line 105 of
"/usr/share/horde3/lib/Horde/SessionHandler/mysql.php"]
Feb 07 21:33:40 HORDE [debug] [horde] SQL Query by
SessionHandler_mysql::read(): query = "SELECT session_data FROM
horde_sessionhandler WHERE session_id =
'd4f75aca44b6f07e059f94d0a92ab3e9' AND session_lastmodified > 117073
6420 FOR UPDATE" [on line 105 of
"/usr/share/horde3/lib/Horde/SessionHandler/mysql.php"]
Feb 07 21:33:40 HORDE [debug] [horde] SQL Query by
SessionHandler_mysql::read(): query = "SELECT session_data FROM
horde_sessionhandler WHERE session_id =
'd4f75aca44b6f07e059f94d0a92ab3e9' AND session_lastmodified > 117073
6420 FOR UPDATE" [on line 105 of
"/usr/share/horde3/lib/Horde/SessionHandler/mysql.php"]
Feb 07 21:33:40 HORDE [debug] [] SQL Query by
DataTree_sql::_buildParentIds(): SELECT datatree_id, datatree_parents
FROM horde_datatree WHERE datatree_name = ? AND group_uid = ? ORDER BY
datatree_id [on line 261 of "/usr/sh
are/horde3/lib/Horde/DataTree/sql.php"]
Feb 07 21:33:40 HORDE [debug] [] SQL Query by DataTree_sql::_load():
SELECT c.datatree_id, c.datatree_name, c.datatree_parents,
c.datatree_order FROM horde_datatree c WHERE c.group_uid =
'horde.perms'  [on line 130 of "/usr
/share/horde3/lib/Horde/DataTree/sql.php"]
Feb 07 21:33:40 HORDE [debug] [] User  does not have READ permission for
mimp [on line 770 of "/usr/share/horde3/lib/Horde/Registry.php"]

Then it just repeats those lines over and over.

The applicable section of my conf.php from horde looks like this:
$conf['auth']['driver'] = 'composite';
$conf['auth']['params']['drivers'] = array(
                'imp' => array('driver' => 'application',
                        'params' => array('app' => 'imp')),
                'mimp' => array('driver' => 'application',
                        'params' => array('app' => 'mimp')));

$conf['auth']['params']['loginscreen_switch'] = '_horde_select_loginscreen';
        if (!function_exists('_horde_select_loginscreen')) {
                function _horde_select_loginscreen()
                {
                        require_once 'Horde/Browser.php';
                        $browser = new Browser();
                        if ($browser->isMobile()) {
                                return 'mimp';
                        }
                        return 'imp';
                }
        }

It's also probably worth mentioning that if I use a regular browser and
first authenticate to IMP, I can then proceed to MIMP, log in again, and
see the MIMP mailbox.

Any pointers would be greatly appreciated.
Joel


More information about the imp mailing list