From: Michael M Slusarz Date: Wed, 7 Apr 2010 16:26:56 +0000 (-0600) Subject: Key can't be empty when passing to Crypt_Blowfish X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=271ce27ceee4749c667b3d0b51be8947c915472d;p=horde.git Key can't be empty when passing to Crypt_Blowfish --- diff --git a/framework/Secret/lib/Horde/Secret.php b/framework/Secret/lib/Horde/Secret.php index 72fcd164e..104dd5411 100644 --- a/framework/Secret/lib/Horde/Secret.php +++ b/framework/Secret/lib/Horde/Secret.php @@ -72,7 +72,7 @@ class Horde_Secret { $val = strlen($key) ? $this->_getCipherOb($key)->encrypt($message) - : false; + : ''; if ($val instanceof PEAR_Error) { throw new Horde_Secret_Exception($val); @@ -92,7 +92,9 @@ class Horde_Secret */ public function read($key, $ciphertext) { - $val = $this->_getCipherOb($key)->decrypt($ciphertext); + $val = strlen($key) + ? $this->_getCipherOb($key)->decrypt($ciphertext) + : ''; if ($val instanceof PEAR_Error) { throw new Horde_Secret_Exception($val);