Commit 11c9c5b5 by Qiang Xue

fixed test break.

parent 450187c3
......@@ -1176,7 +1176,7 @@ class Request extends \yii\base\Request
return true;
}
$trueToken = $this->getCookies()->getValue($this->csrfVar);
$token = $this->getBodyParam($this->csrfVar);
$token = $method === 'POST' ? $this->getPostParam($this->csrfVar) : $this->getBodyParam($this->csrfVar);
return $this->validateCsrfTokenInternal($token, $trueToken)
|| $this->validateCsrfTokenInternal($this->getCsrfTokenFromHeader(), $trueToken);
}
......
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