From 92b9ae382fcc2c6ef65f0c6371a600383883deb8 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Sat, 14 Dec 2013 22:22:54 +0300 Subject: [PATCH] Update BaseSecurity.php prevent call strlen function twice --- framework/yii/helpers/BaseSecurity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/yii/helpers/BaseSecurity.php b/framework/yii/helpers/BaseSecurity.php index a49dd78..58fec95 100644 --- a/framework/yii/helpers/BaseSecurity.php +++ b/framework/yii/helpers/BaseSecurity.php @@ -302,7 +302,7 @@ class BaseSecurity $test = crypt($password, $hash); $n = strlen($test); - if (strlen($test) < 32 || $n !== strlen($hash)) { + if ($n < 32 || $n !== strlen($hash)) { return false; }