[FOLLOWUP][BUGFIX] Redirect BE user to login on invalid module/route token 88/50688/3
authorMarkus Klein <markus.klein@typo3.org>
Thu, 17 Nov 2016 07:10:11 +0000 (08:10 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Thu, 17 Nov 2016 14:43:35 +0000 (15:43 +0100)
Resolves: #69763
Releases: master, 7.6
Change-Id: Ib5ec7e26cadb51b972ff617f23121cebd490bdb5
Reviewed-on: https://review.typo3.org/50688
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/backend/Classes/Http/AjaxRequestHandler.php
typo3/sysext/backend/Classes/Http/RequestHandler.php
typo3/sysext/backend/Classes/Http/RouteDispatcher.php

index f1019a0..c92491e 100644 (file)
@@ -16,9 +16,8 @@ namespace TYPO3\CMS\Backend\Http;
 
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use TYPO3\CMS\Backend\Routing\Exception\InvalidRequestTokenException;
 use TYPO3\CMS\Backend\Routing\Exception\ResourceNotFoundException;
-use TYPO3\CMS\Backend\Routing\Exception\RouteNotFoundException;
-use TYPO3\CMS\Backend\Routing\Route;
 use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\FormProtection\FormProtectionFactory;
 use TYPO3\CMS\Core\Http\RequestHandlerInterface;
@@ -151,7 +150,7 @@ class AjaxRequestHandler implements RequestHandlerInterface
      * @param ServerRequestInterface $request
      * @return ResponseInterface $response
      * @throws ResourceNotFoundException if no valid route was found
-     * @throws RouteNotFoundException if the request could not be verified
+     * @throws InvalidRequestTokenException if the request could not be verified
      */
     protected function dispatch(ServerRequestInterface $request)
     {
index 3441d5f..2508f5c 100644 (file)
@@ -17,7 +17,6 @@ namespace TYPO3\CMS\Backend\Http;
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
 use TYPO3\CMS\Backend\Routing\Exception\InvalidRequestTokenException;
-use TYPO3\CMS\Backend\Routing\Exception\RouteNotFoundException;
 use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Http\RequestHandlerInterface;
 use TYPO3\CMS\Core\Http\Response;
@@ -129,7 +128,7 @@ class RequestHandler implements RequestHandlerInterface
      *
      * @param ServerRequestInterface $request
      * @return ResponseInterface
-     * @throws RouteNotFoundException when no route is registered
+     * @throws InvalidRequestTokenException if the request could not be verified
      * @throws \InvalidArgumentException when a route is found but the target of the route cannot be called
      */
     protected function dispatch($request)
index 19db8cb..66a32b8 100644 (file)
@@ -35,7 +35,7 @@ class RouteDispatcher extends Dispatcher implements DispatcherInterface
      * @param ServerRequestInterface $request the current server request
      * @param ResponseInterface $response the prepared response
      * @return ResponseInterface the filled response by the callable / controller/action
-     * @throws RouteNotFoundException if the route was not found
+     * @throws InvalidRequestTokenException if the route was not found
      * @throws \InvalidArgumentException if the defined target for the route is invalid
      */
     public function dispatch(ServerRequestInterface $request, ResponseInterface $response)