6.0.0-beta1
7/19/25

[#7756] checkRequestToken in Horde.php -> all tokens are only valid for 0min
Summary checkRequestToken in Horde.php -> all tokens are only valid for 0min
Queue Horde Framework Packages
Queue Version FRAMEWORK_3
Type Bug
State Resolved
Priority 2. Medium
Owners chuck (at) horde (dot) org
Requester harakiri_23 (at) yahoo (dot) com
Created 12/05/2008 (6070 days ago)
Due
Updated 12/08/2008 (6067 days ago)
Assigned
Resolved 12/08/2008 (6067 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
12/08/2008 02:37:17 AM Chuck Hagenbuch Comment #3
Assigned to Chuck Hagenbuch
Summary ⇒ checkRequestToken in Horde.php -> all tokens are only valid for 0min
State ⇒ Resolved
Priority ⇒ 2. Medium
Reply to this comment
Seems to be working fine for most people, but clarified anyway. Thanks!
12/08/2008 02:36:50 AM CVS Commit Comment #2 Reply to this comment
12/05/2008 10:52:47 AM harakiri_23 (at) yahoo (dot) com Comment #1
Priority ⇒ 3. High
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ checkRequestToken in Horde.php -> all tokens are only valid for 0min
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
There is a math bug in the Horde.php checkRequestToken, the 
paranthesis are missing :



instead of



         if ($_SESSION['horde_form_secrets'][$token] + 
$GLOBALS['conf']['urls']['token_lifetime'] * 60 < time()) {

             return PEAR::raiseError(sprintf(_("This request cannot be 
completed because the link you followed or the form you submitted was 
only valid for %s minutes"), 
$GLOBALS['conf']['urls']['token_lifetime']));

         }





it should be



  if (($_SESSION['horde_form_secrets'][$token] + 
$GLOBALS['conf']['urls']['token_lifetime']) * 60 < time()) {

             return PEAR::raiseError(sprintf(_("This request cannot be 
completed because the link you followed or the form you submitted was 
only valid for %s minutes"), 
$GLOBALS['conf']['urls']['token_lifetime']));

         }



no matter which setting you chose for token_lifetime - it will always 
complain about that the link is no longer valid.

Saved Queries