98197[TASK] Check Extbase authorization before file upload handling
Commit message
Uploaded files and file deletions of #[FileUpload] properties were processed before the #[Authorize] and #[RateLimit] checks. A request denied with HTTP 403 or rate limited with HTTP 429 had therefore already stored its uploads and applied its deletions, although the action itself was not executed. The checks now run before any file handling, so denied and rate limited requests no longer change files in storage. Authorization callbacks receive the arguments without the file changes of the current request; the action and BeforeActionCallEvent still receive them with all file changes applied.
Resolves: #111610 Releases: main, 14.3 Signed-off-by: Torben Hansen <derhansen@gmail.com> Change-Id: Ie780dd71fa33584597d02ed83faaca6303689b70 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/98197 Tested-by: Alexander Schnitzler <git@alexanderschnitzler.de> Reviewed-by: Markus Klein <markus.klein@typo3.org> Reviewed-by: Alexander Schnitzler <git@alexanderschnitzler.de> Tested-by: Oliver Klee <typo3-coding@oliverklee.de> Tested-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Tested-by: core-ci <typo3@b13.com> Tested-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Simon Schaufelberger <simonschaufi+typo3@gmail.com> Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Review
-
Code review CR +2 Done
- Georg Ringer +2
- Simon Schaufelberger +1
- Oliver Klee +1
- Markus Klein +1
- Alexander Schnitzler +1
-
Verified V +2 Done
- Georg Ringer +2
- Simon Schaufelberger +1
- Oliver Klee +1
- Alexander Schnitzler +1
- core-ci +1 CI
Issues 1
Files 5
- typo3/sysext/core/Documentation/Changelog/14.3.x/Important-111610-ExtbaseAuthorizationAndRateLimitRunBeforeFileHandling.rstnew+37 −0
- typo3/sysext/extbase/Classes/Mvc/Controller/ActionController.php+10 −3
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/extbase_upload/Classes/Controller/SingleFileUploadController.php+14 −0
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/extbase_upload/ext_localconf.php+2 −2
- typo3/sysext/extbase/Tests/Functional/Mvc/Controller/FileUploadControllerTest.php+67 −24
Review log 1113
-
Torben Hansen uploaded patch set 1 11/29/26, 17:56
-
Torben Hansen wrote 11/29/26, 17:56
Topic set to extbase -
core-ci voted on patch set 1 V +1 11/29/26, 18:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115971
-
Oliver Klee voted on patch set 1 CR +1 V +1 11/30/26, 12:22
-
Markus Klein voted on patch set 1 CR +1 11/30/26, 15:36
-
Benni Mack uploaded patch set 2
CR +1V +111/30/26, 16:05 -
core-ci voted on patch set 2 V +1 11/30/26, 16:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/116048
-
Oliver Klee voted on patch set 2 CR +1 V +1 11/30/26, 16:58
-
Alexander Schnitzler voted on patch set 2 CR +1 V +1 11/30/26, 17:24
-
Markus Klein voted on patch set 2 CR +1 11/30/26, 18:20
-
Simon Schaufelberger voted on patch set 2 CR +1 V +1 12/04/26, 19:33
-
Georg Ringer voted on patch set 2 CR +2 V +2 12/04/26, 20:47
-
Georg Ringer merged patch set 3 12/04/26, 20:47