Browse Source

Blowfish cost must be in range 4…31, not 4…30

`generateSalt` parameter validation fix.
tags/2.0.0-alpha
MaximAL 11 years ago
parent
commit
3b8aff5a44
  1. 2
      framework/yii/helpers/SecurityBase.php

2
framework/yii/helpers/SecurityBase.php

@ -262,7 +262,7 @@ class SecurityBase
protected static function generateSalt($cost = 13)
{
$cost = (int)$cost;
if ($cost < 4 || $cost > 30) {
if ($cost < 4 || $cost > 31) {
throw new InvalidParamException('Cost must be between 4 and 31.');
}

Loading…
Cancel
Save