diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index bf68780..b3b59b3 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -165,7 +165,7 @@ Yii Framework 2 Change Log - Chg: Removed implementation of `Arrayable` from `yii\Object` (qiangxue) - Chg: Renamed `ActiveRecordInterface::createActiveRelation()` to `createRelation()` (qiangxue) - Chg: The scripts in asset bundles are now registered in `View` at the end of `endBody()`. It was done in `endPage()` previously (qiangxue) -- Chg: Renamed `csrf-var` to `csrf-param` as `csrf-var` is not a valid meta tag name (Dilip) +- Chg: Renamed `csrf-var` to `csrf-param` for CSRF header name (Dilip) - New #66: [Auth client library](https://github.com/yiisoft/yii2-authclient) OpenId, OAuth1, OAuth2 clients (klimov-paul) - New #706: Added `yii\widgets\Pjax` and enhanced `GridView` to work with `Pjax` to support AJAX-update (qiangxue) - New #1393: [Codeception testing framework integration](https://github.com/yiisoft/yii2-codeception) (Ragazzo) diff --git a/framework/web/View.php b/framework/web/View.php index 85e0589..bdb7046 100644 --- a/framework/web/View.php +++ b/framework/web/View.php @@ -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-param', 'content' => $request->csrfVar]); + $lines[] = Html::tag('meta', '', ['name' => 'csrf-param', 'content' => $request->csrfParam]); $lines[] = Html::tag('meta', '', ['name' => 'csrf-token', 'content' => $request->getCsrfToken()]); }