problems w/ redirect.php based autologin for CVS IMP

Liam Hoekenga liamr@umich.edu
Tue, 12 Mar 2002 00:09:33 -0500


I made a copy of redirect.php that handles automatic logging in on our IMP 3.0 
/ Horde 2.0 installation:

--- redirect.php        Tue Jan 29 00:07:32 2002
+++ UMlogin.php Tue Jan 29 00:07:15 2002
@@ -41,4 +41,20 @@
 
 /* Create a new session if we're given the proper parameters. */
+if (!isset($HTTP_POST_VARS['imapuser'])) {
+    $HTTP_POST_VARS['imapuser'] = $GLOBALS['HTTP_SERVER_VARS']['REMOTE_USER'];
+    $HTTP_POST_VARS['pass'] = 'cheese';
+    $HTTP_POST_VARS['mailbox'] = 'INBOX';
+    $HTTP_POST_VARS['server'] = 
+           substr ($GLOBALS['HTTP_SERVER_VARS']['REMOTE_USER'],0,1) . 
+           '.imap.itd.umich.edu';
+    $HTTP_POST_VARS['port'] = '143';
+    $HTTP_POST_VARS['namespace'] = '';
+    $HTTP_POST_VARS['maildomain'] = 'umich.edu';
+    $HTTP_POST_VARS['protocol'] = 'imap';
+    $HTTP_POST_VARS['folders'] = 'mail/';
+    $HTTP_POST_VARS['button'] = 'Log+in';
+    }
+
+/* Create a new session if we're given the proper parameters. */
 if (isset($HTTP_POST_VARS['imapuser']) && isset($HTTP_POST_VARS['pass'])) {
     if (!isset($HTTP_POST_VARS['mailbox'])) {

It works fine w/ imp 3.0, but isn't working with copy of the code I checked out 
from CVS (and we've not run the CVS version since the release candidates fro 
3.0).  It just bounces me back to /horde/imp/login.php

This piece out of the cvs redirect.php makes me think that stuff is still 
working out of the HTTP_POST_VARS array...

    if (!Horde::getFormData('mailbox')) {
        $HTTP_POST_VARS['mailbox'] = 'INBOX';
    }

but the behavior suggests I'm not forging things correctly anymore.  Anyone 
have suggestions?

thx
Liam