|
|
@ -120,10 +120,10 @@ class SecurityBase |
|
|
|
static $keys; |
|
|
|
static $keys; |
|
|
|
$keyFile = Yii::$app->getRuntimePath() . '/keys.php'; |
|
|
|
$keyFile = Yii::$app->getRuntimePath() . '/keys.php'; |
|
|
|
if ($keys === null) { |
|
|
|
if ($keys === null) { |
|
|
|
$keys = array(); |
|
|
|
$keys = array(); |
|
|
|
if (is_file($keyFile)) { |
|
|
|
if (is_file($keyFile)) { |
|
|
|
$keys = require($keyFile); |
|
|
|
$keys = require($keyFile); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!isset($keys[$name])) { |
|
|
|
if (!isset($keys[$name])) { |
|
|
|
$keys[$name] = static::generateRandomKey($length); |
|
|
|
$keys[$name] = static::generateRandomKey($length); |
|
|
|