Form: Disable CSRF counter measure only on API requests

refs #9660
This commit is contained in:
Eric Lippmann 2015-07-30 12:04:22 +02:00
parent c23c7a5fa9
commit 9aa1599a18
1 changed files with 1 additions and 2 deletions

View File

@ -951,8 +951,7 @@ class Form extends Zend_Form
if (! $this->tokenDisabled) {
$request = $this->getRequest();
if (! $request->isXmlHttpRequest()
&& ($user = $request->getUser()) !== null
&& $user->getIsHttpUser()
&& $request->getIsApiRequest()
) {
return $this;
}