small bug in Secret.php

Gaudenz Steinlin gaudenz.steinlin@id.unibe.ch
Tue, 10 Jul 2001 14:04:55 +0200


Hi

there is a small bug in Secret.php on line 88. The third argument to 
setcookie should be the time to life and not the path. here is a patch
that works fine for me (the bug caused me some nifty debuging).

-------------- snip -------------------------------------

--- lib/Secret.php	2001/06/14 19:57:33	1.8
+++ lib/Secret.php	2001/07/10 11:54:16
@@ -85,7 +85,7 @@
             Secret::srand();
             $key = md5(uniqid(mt_rand()));
             $GLOBALS['HTTP_COOKIE_VARS'][$keyname . '_key'] = $key;
-            setcookie($keyname . '_key', $key, $GLOBALS['conf']['horde']['cookie_path'], $GLOBALS['conf']['horde']['cookie_domain']);
+            setcookie($keyname . '_key', $key,0, $GLOBALS['conf']['horde']['cookie_path'], $GLOBALS['conf']['horde']['cookie_domain']);
         } else {
             $key = md5(session_id() . $GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME']);
         }
------------ snip ---------------------------------------

- gaudenz