[dev] Auth bug

KaalH! kaalh@smol.org
Wed, 4 Sep 2002 14:45:50 +0200


With HEAD, when login to horde with imp, I sometimes got this error :

Notice: unserialize() failed at offset 0 of 37 bytes in /home/smol/tools/horde-
dev/lib/Auth.php on line 299

I finally found what appends.

When login whith imp, the secret key used to store user info is "imp".
So, in non-imp operation (ex: changing horde options), horde try to retrieve 
secret information with the "auth" key, this is the bug !

a small fix (only if log in with imp):

Index: login.php
===================================================================
RCS file: /repository/imp/login.php,v
retrieving revision 2.168
diff -u -r2.168 login.php
--- login.php   21 Aug 2002 19:26:54 -0000      2.168
+++ login.php   4 Sep 2002 12:35:45 -0000
@@ -101,7 +101,7 @@
 }
 
 /* Initialize the password key. */
-Secret::setKey('imp');
+Secret::setKey('auth');
 
 /* Iterate through the servers in an attempt to locate a preferred
    server for this web server/virtualhost. If none are found, we

-- 
KaalH!