From: Jan Schneider Date: Tue, 6 Jul 2010 22:34:22 +0000 (+0200) Subject: Don't encrypt/decrypt empty messages. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=adbdf2167a21a091e69e3a14e553ea0d84b2f7ae;p=horde.git Don't encrypt/decrypt empty messages. --- diff --git a/framework/Secret/lib/Horde/Secret.php b/framework/Secret/lib/Horde/Secret.php index 6675daf92..41f400aba 100644 --- a/framework/Secret/lib/Horde/Secret.php +++ b/framework/Secret/lib/Horde/Secret.php @@ -70,7 +70,7 @@ class Horde_Secret */ public function write($key, $message) { - $val = strlen($key) + $val = strlen($key) && strlen($message) ? $this->_getCipherOb($key)->encrypt($message) : ''; @@ -92,7 +92,7 @@ class Horde_Secret */ public function read($key, $ciphertext) { - $val = strlen($key) + $val = strlen($key) && strlen($ciphertext) ? $this->_getCipherOb($key)->decrypt($ciphertext) : '';