"fixed one byte to long key-size"

This commit is contained in:
Ralf Becker 2009-04-28 15:36:51 +00:00
parent 7224022772
commit ee45dc8567

View File

@ -357,7 +357,7 @@ class etemplate_request
mcrypt_create_iv ($iv_size, MCRYPT_RAND) : substr($GLOBALS['egw_info']['server']['mcrypt_iv'],0,$iv_size); 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); $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) if (mcrypt_generic_init(self::$mcrypt,$key, $iv) < 0)
{ {