<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>incorrect cookie expiration times</title> 
  <pubDate>Fri, 10 Apr 2026 19:28:35 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/1302</link> 
  <atom:link rel="self" type="application/rss+xml" title="incorrect cookie expiration times" href="https://bugs.horde.org/ticket/1302/rss" /> 
  <description>incorrect cookie expiration times</description> 
 
   
   
  <item> 
   <title>In the file lib/Horde/Secret.php you use many times:



@set</title> 
   <description>In the file lib/Horde/Secret.php you use many times:



@setcookie($keyname . &#039;_key&#039;, $key, $conf[&#039;session&#039;][&#039;timeout&#039;], $conf[&#039;cookie&#039;][&#039;path&#039;], $conf[&#039;cookie&#039;][&#039;domain&#039;], $conf

[&#039;use_ssl&#039;] == 1 ? 1 : 0);



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



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

[&#039;use_ssl&#039;] == 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).</description> 
   <pubDate>Thu, 03 Feb 2005 14:14:22 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/1302#t5160</link> 
  </item> 
   
  <item> 
   <title>We don&#039;t say anywhere that the value entered there is the ex</title> 
   <description>We don&#039;t say anywhere that the value entered there is the expiration interval. Instead we even point to the setcookie() documentation explicitely.



OTOH it doesn&#039;t make sense to enter a fixed value (integer) here, because you most likely want to always have a dynamic value there. Thus I changed the configuration type so that you now can enter PHP code there.</description> 
   <pubDate>Thu, 03 Feb 2005 16:39:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/1302#t5171</link> 
  </item> 
   
  <item> 
   <title>This wasn&#039;t the right fix; we use the timeout value elsewher</title> 
   <description>This wasn&#039;t the right fix; we use the timeout value elsewhere when it *is* relative. Reopening.</description> 
   <pubDate>Sat, 02 Apr 2005 05:26:19 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/1302#t6822</link> 
  </item> 
   
  <item> 
   <title>Okay, this should be correct in Horde 3.0.5.</title> 
   <description>Okay, this should be correct in Horde 3.0.5.</description> 
   <pubDate>Sat, 02 Apr 2005 05:40:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/1302#t6825</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
