mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 14:26:54 +08:00
Removed unnecessary token generation. We already have it.
This commit is contained in:
@ -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;
|
||||||
|
Reference in New Issue
Block a user