mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
Changed csrf-var to csrf-param
Changed csrf-var to csrf-param due to meta validation error. The validation error as mentioned in the issue https://github.com/yiisoft/yii2/issues/2363. It is fixed in this pull request.
This commit is contained in:
@ -454,7 +454,7 @@ class View extends \yii\base\View
|
||||
|
||||
$request = Yii::$app->getRequest();
|
||||
if ($request instanceof \yii\web\Request && $request->enableCsrfValidation && !$request->getIsAjax()) {
|
||||
$lines[] = Html::tag('meta', '', ['name' => 'csrf-var', 'content' => $request->csrfVar]);
|
||||
$lines[] = Html::tag('meta', '', ['name' => 'csrf-param', 'content' => $request->csrfVar]);
|
||||
$lines[] = Html::tag('meta', '', ['name' => 'csrf-token', 'content' => $request->getCsrfToken()]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user