Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.
96201[FEATURE] Introduce upload constraints for file uploads
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 2
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/01/96201/2 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/01/96201/2 && git cherry-pick FETCH_HEAD
Review
-
Code review CR 0 Needs a vote
-
Verified V 0 Needs a vote
- core-ci +1 CI
Issues 2
Files 36
- typo3/sysext/backend/Classes/Form/Container/FilesControlContainer.php+12 −1
- typo3/sysext/core/Classes/Http/UploadedFile.php+2 −2
- typo3/sysext/core/Classes/Resource/Exception/UploadRejectedException.phpnew+33 −0
- typo3/sysext/core/Classes/Resource/Security/FileNameValidator.php+4 −2
- typo3/sysext/core/Classes/Resource/Security/StoragePermissionsAspect.php+6 −4
- typo3/sysext/core/Classes/Resource/Upload/Constraint/FileDenyPatternConstraint.phpnew+59 −0
- typo3/sysext/core/Classes/Resource/Upload/Constraint/PhpUploadLimitConstraint.phpnew+74 −0
- typo3/sysext/core/Classes/Resource/Upload/UploadConstraintDescription.phpnew+36 −0
- typo3/sysext/core/Classes/Resource/Upload/UploadConstraintInterface.phpnew+43 −0
- typo3/sysext/core/Classes/Resource/Upload/UploadConstraintRegistry.phpnew+60 −0
- typo3/sysext/core/Classes/Resource/Upload/UploadContext.phpnew+38 −0
- typo3/sysext/core/Classes/Resource/Upload/UploadRejection.phpnew+31 −0
- typo3/sysext/core/Classes/Resource/Upload/UploadRequirements.phpnew+59 −0
- typo3/sysext/core/Classes/Resource/ResourceStorage.php2+31 −8
- typo3/sysext/core/Classes/Resource/StorageRepository.php+3 −1
- typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php+7 −7
- typo3/sysext/core/Classes/Utility/GeneralUtility.php+9 −10
- typo3/sysext/core/Configuration/Services.php+2 −0
- typo3/sysext/core/Configuration/Services.yaml+7 −0
- typo3/sysext/core/Documentation/Changelog/15.0/Deprecation-110832-GeneralUtilityGetMaxUploadFileSize.rstnew+73 −0
Show 16 more files
- typo3/sysext/core/Documentation/Changelog/15.0/Feature-110832-UploadConstraintsForFileUploads.rstnew+134 −0
- typo3/sysext/core/Resources/Private/Language/locallang_core.xlf+6 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_upload_constraint/Classes/Upload/TestUploadConstraint.phpnew+58 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_upload_constraint/Configuration/Services.yamlnew+8 −0
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_upload_constraint/composer.jsonnew+23 −0
- typo3/sysext/core/Tests/Functional/Resource/Upload/Constraint/FileDenyPatternConstraintTest.phpnew+97 −0
- typo3/sysext/core/Tests/Functional/Resource/Upload/Constraint/PhpUploadLimitConstraintTest.phpnew+92 −0
- typo3/sysext/core/Tests/Functional/Resource/Upload/UploadConstraintTest.phpnew+239 −0
- typo3/sysext/core/Tests/Unit/Resource/Upload/UploadConstraintRegistryTest.phpnew+155 −0
- typo3/sysext/core/Tests/Unit/Resource/StorageRepositoryTest.php+2 −0
- typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php+1 −0
- typo3/sysext/filelist/Classes/Controller/FileListController.php+8 −2
- typo3/sysext/filelist/Classes/ElementBrowser/CreateFileBrowser.php+9 −2
- typo3/sysext/form/Classes/ViewHelpers/Be/MaximumFileSizeViewHelper.php+3 −2
- typo3/sysext/install/Configuration/ExtensionScanner/Php/MethodCallStaticMatcher.php+7 −0
- composer.json+1 −0
Review log 68
-
Sebastian Michaelsen uploaded patch set 1 09/30/26, 06:18
-
core-ci voted on patch set 1 V +1 09/30/26, 06:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109577
-
Sebastian Michaelsen marked it ready for review 09/30/26, 08:17
-
Benni Mack commented on patch set 1 CR -1 09/30/26, 08:26
-
Sebastian Michaelsen marked it work in progress 09/30/26, 08:42
-
Sebastian Michaelsen uploaded patch set 2
CR -1V +109/30/26, 08:51 -
core-ci voted on patch set 2 V +1 09/30/26, 08:59 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/109599
-
Sebastian Michaelsen commented on patch set 2 09/30/26, 09:00
This change is ready for review.ResourceStorage.php:1036ReplyGood catch. That was unintentional. In patchset #2 the backend user is now set as a property of the ResourceStorage only if we're in a backend request. I did not pass the UploadContext (I assume you meant that), because the ResourceStorage already knows the storage and folder and the user binding of the storage fits nicely into StoragePermissionsAspect. If you really want to pass the UploadContext into ResourceStorage, I can build it that way as well.
ResourceStorage.php:1036