Browse Source

Update BaseSecurity.php

prevent call strlen function twice
tags/2.0.0-beta
Vladimir 11 years ago
parent
commit
92b9ae382f
  1. 2
      framework/yii/helpers/BaseSecurity.php

2
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;
}

Loading…
Cancel
Save