reverted duplicated fix for #1244

fixes #1244
This commit is contained in:
Carsten Brandt
2013-11-20 21:09:30 +01:00
parent 070bd9625c
commit a82330b212

View File

@@ -92,8 +92,6 @@ class Controller extends \yii\base\Controller
{ {
if (parent::beforeAction($action)) { if (parent::beforeAction($action)) {
if ($this->enableCsrfValidation && !Yii::$app->getRequest()->validateCsrfToken()) { if ($this->enableCsrfValidation && !Yii::$app->getRequest()->validateCsrfToken()) {
// avoid checking again if errorAction is called to display exception
Yii::$app->getRequest()->enableCsrfValidation = false;
throw new HttpException(400, Yii::t('yii', 'Unable to verify your data submission.')); throw new HttpException(400, Yii::t('yii', 'Unable to verify your data submission.'));
} }
return true; return true;