[TASK] Use &route=/ajax/ instead of &ajaxId for BE AJAX calls
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Classes / Http / RouteDispatcher.php
index 66a32b8..957f85c 100644 (file)
@@ -78,12 +78,8 @@ class RouteDispatcher extends Dispatcher implements DispatcherInterface
         $route = $request->getAttribute('route');
         if ($route->getOption('access') === 'public') {
             return true;
-        } elseif ($route->getOption('ajax')) {
-            $token = (string)(isset($request->getParsedBody()['ajaxToken']) ? $request->getParsedBody()['ajaxToken'] : $request->getQueryParams()['ajaxToken']);
-            return $this->getFormProtection()->validateToken($token, 'ajaxCall', $route->getOption('_identifier'));
-        } else {
-            $token = (string)(isset($request->getParsedBody()['token']) ? $request->getParsedBody()['token'] : $request->getQueryParams()['token']);
-            return $this->getFormProtection()->validateToken($token, 'route', $route->getOption('_identifier'));
         }
+        $token = (string)(isset($request->getParsedBody()['token']) ? $request->getParsedBody()['token'] : $request->getQueryParams()['token']);
+        return $this->getFormProtection()->validateToken($token, 'route', $route->getOption('_identifier'));
     }
 }