98302[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/+/98302 Tested-by: core-ci <typo3@b13.com> Tested-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Review
-
Code review CR +2 Done
- Georg Ringer +2
-
Verified V +2 Done
- Georg Ringer +2
- 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 34
-
Georg Ringer uploaded patch set 1 12/03/26, 14:25
-
core-ci voted on patch set 1 V +1 12/03/26, 14:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/116247
-
Georg Ringer voted on patch set 1 CR +2 V +2 12/04/26, 20:47
-
Georg Ringer merged patch set 2 12/04/26, 20:47