From ee45dc8567a88d3db85702582e3a02d41c14b0b1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 28 Apr 2009 15:36:51 +0000 Subject: [PATCH] "fixed one byte to long key-size" --- etemplate/inc/class.etemplate_request.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etemplate/inc/class.etemplate_request.inc.php b/etemplate/inc/class.etemplate_request.inc.php index 17ca4ab6a8..abbf5e0ab7 100644 --- a/etemplate/inc/class.etemplate_request.inc.php +++ b/etemplate/inc/class.etemplate_request.inc.php @@ -357,7 +357,7 @@ class etemplate_request mcrypt_create_iv ($iv_size, MCRYPT_RAND) : substr($GLOBALS['egw_info']['server']['mcrypt_iv'],0,$iv_size); $key_size = mcrypt_enc_get_key_size(self::$mcrypt); - if (strlen($key) > $key_size) $key = substr($key,0,$key_size); + if (strlen($key) > $key_size) $key = substr($key,0,$key_size-1); if (mcrypt_generic_init(self::$mcrypt,$key, $iv) < 0) {