[Tickets #1302] NEW: incorrect cookie expiration times

bugs at bugs.horde.org bugs at bugs.horde.org
Thu Feb 3 06:14:23 PST 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=1302
-----------------------------------------------------------------------
 Ticket     | 1302
 Created By | m.zdila at episoftware.com
 Summary    | incorrect cookie expiration times
 Queue      | Horde Base
 Version    | 3.0.2
 State      | Unconfirmed
 Priority   | 3. High
 Type       | Bug
 Owners     | 
-----------------------------------------------------------------------


m.zdila at episoftware.com (2005-02-03 06:14) wrote:

In the file lib/Horde/Secret.php you use many times:

@setcookie($keyname . '_key', $key, $conf['session']['timeout'],
$conf['cookie']['path'], $conf['cookie']['domain'], $conf
['use_ssl'] == 1 ? 1 : 0);

But the setcookie function expect absolute time of cookie expiration, not
relative. Therefore the correct form should be:

@setcookie($keyname . '_key', $conf['session']['timeout'] == 0 ? 0 : $key,
time() + $conf['session']['timeout'], $conf['cookie']['path'],
$conf['cookie']['domain'], $conf
['use_ssl'] == 1 ? 1 : 0);

Am I right? I lost about 5 hours :-/ to find a problem why the IMP
application forever reloads when I use cookies. Only MSIE worked (it kept
the cookie with the time in the past).




More information about the bugs mailing list