Skip to content

Commit

Permalink
Partially Revert "Don't use local cipher caches if the key changed (B…
Browse files Browse the repository at this point in the history
…ug #14231)."

In Horde_Secret, the cache key is built from the secret key, so it invalidates itself.

This reverts commit d9defef.
  • Loading branch information
yunosh committed Feb 12, 2016
1 parent d9defef commit f878461
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions framework/Secret/lib/Horde/Secret.php
Expand Up @@ -115,8 +115,7 @@ protected function _getCipherOb($key)
$key = substr($key, 0, 56);

$idx = hash('md5', $key);
if (!isset($this->_cipherCache[$idx]) ||
$this->_cipherCache[$idx]->key != $key) {
if (!isset($this->_cipherCache[$idx])) {
$this->_cipherCache[$idx] = new Horde_Crypt_Blowfish($key);
}

Expand Down
4 changes: 2 additions & 2 deletions framework/Secret/package.xml
Expand Up @@ -27,7 +27,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [jan] Don&apos;t use local cipher cache if the key changed (Bug #14231).
*
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -446,7 +446,7 @@ Initial release as a PEAR package
<date>2016-02-02</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [jan] Don&apos;t use local cipher cache if the key changed (Bug #14231).
*
</notes>
</release>
</changelog>
Expand Down

0 comments on commit f878461

Please sign in to comment.