67655[FEATURE] Restrict Backend Routes to specified HTTP methods
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Oli Bartsch +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Oli Bartsch +1
- TYPO3com +1 CI
- core-ci +1 CI
Issues 1
Files 9
- typo3/sysext/backend/Classes/Controller/LoginController.php+5 −1
- typo3/sysext/backend/Classes/Middleware/BackendRouteInitialization.php+4 −0
- typo3/sysext/backend/Classes/Routing/Exception/MethodNotAllowedException.phpnew+25 −0
- typo3/sysext/backend/Classes/Routing/Route.php2+28 −0
- typo3/sysext/backend/Classes/Routing/Router.php2+22 −6
- typo3/sysext/backend/Classes/ServiceProvider.php2+5 −0
- typo3/sysext/backend/Configuration/Backend/Routes.php+2 −0
- typo3/sysext/backend/Tests/Functional/Routing/RouterTest.phpnew+81 −0
- typo3/sysext/core/Documentation/Changelog/master/Feature-93455-BackendRoutesRestrictedToSpecifiedHTTPMethods.rstnew+46 −0
Review log 1325
-
Benni Mack uploaded patch set 1 02/05/21, 20:19
-
TYPO3com voted on patch set 1 V -1 02/05/21, 20:26 Completed build in 07m 15s on Fri, 5 Feb, 08:26 PM Test Summary: 32585 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9318
-
Benni Mack updated the commit message in patch set 2 02/06/21, 21:56
-
TYPO3com voted on patch set 2 V -1 02/06/21, 22:04 Completed build in 07m 49s on Sat, 6 Feb, 10:04 PM Test Summary: 4 of 32826 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9338
-
Benni Mack uploaded patch set 3 02/06/21, 22:22
-
TYPO3com voted on patch set 3 V +1 02/06/21, 22:30 Completed build in 08m 39s on Sat, 6 Feb, 10:30 PM Test Summary: 32597 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9339
-
core-ci voted on patch set 3 V +1 02/06/21, 22:32 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/454
-
Benni Mack uploaded patch set 4 02/08/21, 06:45
-
TYPO3com voted on patch set 4 V -1 02/08/21, 06:52 Completed build in 07m 36s on Mon, 8 Feb, 06:52 AM Test Summary: 4 of 32838 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9341
-
core-ci voted on patch set 4 V +1 02/08/21, 06:55 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/470
-
TYPO3com commented on patch set 4 02/08/21, 06:59 Completed build in 22m 01s on Mon, 8 Feb, 06:59 AM Test Summary: 4 of 32838 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9341
-
TYPO3com commented on patch set 4 02/08/21, 09:51 Completed build in 3h 28m 04s on Mon, 8 Feb, 09:51 AM Test Summary: 5 of 32838 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9341
-
Benni Mack rebased onto patch set 5 02/08/21, 16:41
-
TYPO3com voted on patch set 5 V +1 02/08/21, 16:49 Completed build in 07m 54s on Mon, 8 Feb, 04:49 PM Test Summary: 32587 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9356
-
core-ci voted on patch set 5 V +1 02/08/21, 16:52 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/487
-
Benjamin Franzke commented on patch set 5 CR -1 02/08/21, 17:01
-
Benjamin Franzke commented on patch set 5 02/08/21, 17:38
If we trust the router, we should remove conditions [1] that are (now) always false in the (now) restricted actions in ./typo3/sysext/backend/Classes/Controller/LoginController.php [1] something like: $request->getMethod() !== 'POST'Router.php:136I think, for example a GET call to /typo3/login/password-reset/initiate-reset, should *not* result in a 500 HTTP response code (because of TYPO3\CMS\Backend\Routing\Exception\MethodNotAllowedException) when called via GET, but rather be translated that into a 400 Bad Request. That means we need to catch this exception in the BackendRouteInitialization middleware. -
Benjamin Franzke commented on patch set 5 02/08/21, 17:44
ServiceProvider.php:115We should also unset $options['methods']. I guess it was not intended to push the methods into options, right? (that would be redundant) -
Benjamin Franzke uploaded patch set 6 02/08/21, 17:50
-
Benjamin Franzke commented on patch set 6 02/08/21, 17:50
Reply
DoneRoute.php:92ReplyDoneRouter.php:136ReplyDoneServiceProvider.php:115ReplyDone -
TYPO3com voted on patch set 6 V +1 02/08/21, 17:59 Completed build in 08m 19s on Mon, 8 Feb, 05:59 PM Test Summary: 32587 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-9357
-
core-ci voted on patch set 6 V +1 02/08/21, 18:01 Core CI is happy: https://core.b13.com/typo3-core/typo3.cms/-/pipelines/492
-
Oli Bartsch voted on patch set 6 V +1 CR +1 02/08/21, 21:10
-
Benjamin Franzke voted on patch set 6 V +2 CR +2 02/08/21, 21:15
-
Benjamin Franzke merged patch set 7 02/08/21, 21:16
Route.php:92