diff --git a/framework/yii/web/Request.php b/framework/yii/web/Request.php index 9736043..8849ed3 100644 --- a/framework/yii/web/Request.php +++ b/framework/yii/web/Request.php @@ -1040,7 +1040,7 @@ class Request extends \yii\base\Request { $options = $this->csrfCookie; $options['name'] = $this->csrfVar; - $options['value'] = sha1(uniqid(mt_rand(), true)); + $options['value'] = Security::generateRandomKey(); return new Cookie($options); }