Commit 454a9ee5 by Alexander Makarov

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

parent 5e115421
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment