Skip to content

Commit

Permalink
Horde_Secret: Fix up cookie key name on key change / unset
Browse files Browse the repository at this point in the history
This was introduced by commit

00191e0

[mms] If secret key is changed, change the associated $_COOKIE key
or else key change may not be recognized in the current page access (Bug #11570).

Signed-off-by: Michael M Slusarz <slusarz@horde.org>
  • Loading branch information
thomasjfox authored and slusarz committed Jun 24, 2014
1 parent 80f03ac commit 419159e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions framework/Secret/lib/Horde/Secret.php
Expand Up @@ -215,9 +215,9 @@ protected function _setCookie($keyname, $key)
);

if ($key === false) {
unset($_COOKIE[$keyname], $this->_keyCache[$keyname]);
unset($_COOKIE[$keyname . '_key'], $this->_keyCache[$keyname]);
} else {
$_COOKIE[$keyname] = $this->_keyCache[$keyname] = $key;
$_COOKIE[$keyname . '_key'] = $this->_keyCache[$keyname] = $key;
}
}

Expand Down

0 comments on commit 419159e

Please sign in to comment.