Commit c489f822 by Alexander Makarov

Removed unnecessary token generation. We already have it.

parent 85a9887a
...@@ -1287,7 +1287,6 @@ class Request extends \yii\base\Request ...@@ -1287,7 +1287,6 @@ class Request extends \yii\base\Request
$config['value'] = $token; $config['value'] = $token;
Yii::$app->getResponse()->getCookies()->add(new Cookie($config)); Yii::$app->getResponse()->getCookies()->add(new Cookie($config));
} else { } else {
$token = Yii::$app->getSecurity()->generateRandomString();
Yii::$app->getSession()->set($this->csrfParam, $token); Yii::$app->getSession()->set($this->csrfParam, $token);
} }
return $token; return $token;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment