Browse Source

fixes #1303: Security::decrypt now returns null w/o error when null is passed as $data

tags/2.0.0-beta
Alexander Makarov 11 years ago
parent
commit
454a9ee52e
  1. 3
      framework/yii/helpers/BaseSecurity.php

3
framework/yii/helpers/BaseSecurity.php

@ -75,6 +75,9 @@ class BaseSecurity
*/
public static function decrypt($data, $password)
{
if ($data === null) {
return null;
}
$module = static::openCryptModule();
$ivSize = mcrypt_enc_get_iv_size($module);
$iv = StringHelper::substr($data, 0, $ivSize);

Loading…
Cancel
Save