mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
Merge pull request #817 from maximal/patch-1
Blowfish cost must be in range 4…31, not 4…30
This commit is contained in:
@ -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.');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user