96681[FEATURE] Restrict file extensions per storage and mount
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Georg Ringer +1
- Simon Schaufelberger +1
-
Verified V +2 Done
- Oli Bartsch +2
- Georg Ringer +1
- Simon Schaufelberger +1
- core-ci +1 CI
Issues 2
Files 27
- typo3/sysext/backend/Classes/Form/Container/FilesControlContainer.php+56 −17
- typo3/sysext/backend/Classes/View/ResourceUtilityRenderer.php+39 −27
- typo3/sysext/backend/Tests/Functional/Form/Container/FilesControlContainerTest.php+131 −2
- typo3/sysext/backend/Tests/Functional/View/ResourceUtilityRendererTest.phpnew+172 −0
- typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php2+10 −1
- typo3/sysext/core/Classes/Resource/Configuration/FileStorageConfiguration.php+26 −0
- typo3/sysext/core/Classes/Resource/Configuration/FileStorageConfigurationWriter.php+2 −1
- typo3/sysext/core/Classes/Resource/Security/AllowedFileExtensions.phpnew+112 −0
- typo3/sysext/core/Classes/Resource/ResourceStorage.php4+133 −0
- typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php+6 −0
- typo3/sysext/core/Configuration/TCA/sys_filemounts.php2+11 −1
- typo3/sysext/core/Documentation/Changelog/15.0/Feature-103594-AllowedFileExtensionsPerStorageAndFileMount.rst4new+115 −0
- typo3/sysext/core/Resources/Private/Language/fileMessages.xlf+3 −0
- typo3/sysext/core/Resources/Private/Language/locallang_tca.xlf+6 −0
- typo3/sysext/core/Tests/Functional/Authentication/Fixtures/sys_filemounts_same_folder.csvnew+9 −0
- typo3/sysext/core/Tests/Functional/Authentication/BackendUserAuthenticationTest.php+22 −0
- typo3/sysext/core/Tests/Functional/Resource/Configuration/FileStorageConfigurationTest.php+2 −0
- typo3/sysext/core/Tests/Functional/Resource/Configuration/FileStorageConfigurationWriterTest.php+12 −0
- typo3/sysext/core/Tests/Functional/Resource/ResourceStorageTest.php+417 −0
- typo3/sysext/core/Tests/Functional/Utility/File/ExtendedFileUtilityTest.php+47 −0
Show 7 more files
- typo3/sysext/core/Tests/Unit/Resource/Configuration/FileStorageConfigurationTest.php+23 −0
- typo3/sysext/core/Tests/Unit/Resource/Security/AllowedFileExtensionsTest.phpnew+136 −0
- typo3/sysext/filelist/Classes/Controller/FileListController.php+1 −0
- typo3/sysext/filelist/Classes/ElementBrowser/AbstractResourceBrowser.php+1 −0
- typo3/sysext/filelist/Classes/ElementBrowser/FileBrowser.php+4 −1
- typo3/sysext/filelist/Resources/Private/Templates/ElementBrowser/ResourceCreation.fluid.html+1 −0
- typo3/sysext/filelist/Resources/Private/Templates/File/List.fluid.html+1 −0
Review log 3244
Show 1219 earlier messages
-
Oli Bartsch uploaded patch set 1 10/14/26, 13:22
-
Mathias Brodala commented on patch set 1 10/14/26, 13:23
Shouldn't this be coordinated with https://review.typo3.org/c/Packages/TYPO3.CMS/+/95980 ? -
core-ci voted on patch set 1 V +1 10/14/26, 13:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111106
-
Oli Bartsch commented on patch set 1 10/14/26, 13:38
Reply
Sure, will rebase once this is merged. -
Benni Mack commented on patch set 1 10/15/26, 10:27
how do we deal with storages where files were added by an outsider (FTP, External S3 storage etc)? -
Oli Bartsch uploaded patch set 2
V +110/16/26, 16:24 -
Oli Bartsch commented on patch set 2 10/16/26, 16:27
Reply
DoneReply
Nothing changes for them: the restriction only guards ResourceStorage operations, it doesn't filter anything. Files written by FTP or to a shared bucket are indexed and listed as before, and stay manageable as long as they keep their extension. -
core-ci voted on patch set 2 V -1 10/16/26, 16:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111382
-
Oli Bartsch uploaded patch set 3
V -110/17/26, 07:47 -
core-ci voted on patch set 3 V +1 10/17/26, 07:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111428
-
Oli Bartsch rebased onto patch set 4
V +110/19/26, 09:43 -
core-ci voted on patch set 4 V -1 10/19/26, 10:03 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111617
-
Oli Bartsch uploaded patch set 5
V -110/19/26, 10:35 -
core-ci voted on patch set 5 V +1 10/19/26, 10:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111620
-
Garvin Hicking commented on patch set 5 10/19/26, 15:40
BackendUserAuthentication.php:1342Reading this as a human, I don't get it 😄ResourceStorage.php:558Occurs again, maybe centralize this iteration/filter logic?ResourceStorage.php:849The "FileExtensionFilter" class really hurts and should be made stateless as a prepatch? 🙏sys_filemounts.php:51please use the domain syntax for new labels please -
Oli Bartsch uploaded patch set 6 10/19/26, 16:28
Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**") -
Oli Bartsch uploaded patch set 7
V +110/19/26, 16:31 -
core-ci voted on patch set 6 V +1 10/19/26, 16:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111677
-
core-ci voted on patch set 7 V +1 10/19/26, 16:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111678
-
Oli Bartsch commented on patch set 7 10/19/26, 16:47
BackendUserAuthentication.php:1342ReplyDoneResourceStorage.php:558ReplyDoneResourceStorage.php:849ReplyAgreed that it hurts, but making it stateless is public API work and needs its own deprecation. This patch no longer uses FileExtensionFilter at all.sys_filemounts.php:51ReplyDone -
Garvin Hicking voted on patch set 7 CR +1 10/19/26, 21:15
-
Georg Ringer commented on patch set 7 V -1 10/20/26, 19:10
- why is the allowedFileExtensions not inside "configuration"? - I added mp4 only and if I click in the storage on "add file" I expect no online media and also no option to create new text files - Maybe a small flash message would be helpful to tell editors and myself which files are allowed in the storage, because how should I know - by testing every extension? -
Oli Bartsch uploaded patch set 8
CR +1V +110/20/26, 19:30 -
Oli Bartsch commented on patch set 8 10/20/26, 19:31
Reply
- allowedFileExtensions is a storage option, not a driver option: "configuration" is handed to the driver as-is (basePath, pathType, ...), while the restriction is enforced by ResourceStorage. Same level as processingFolder or writable. - "Add file" now offers online media providers and new text files only if their file extension is allowed in the folder, and hides a form when nothing is left. - Instead of a flash message, the allowed file extensions are shown where files are added, and the drag uploader rejects other files right away, naming the allowed ones. -
core-ci voted on patch set 8 V +1 10/20/26, 19:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111930
-
Simon Schaufelberger commented on patch set 8 10/20/26, 22:02
Feature-103594-AllowedFileExtensionsPerStorageAndFileMount.rst:87line is longer than the limit -
Oli Bartsch commented on patch set 8 10/21/26, 05:50
Feature-103594-AllowedFileExtensionsPerStorageAndFileMount.rst:87ReplyHey, which Limit are you referring to? -
Oli Bartsch uploaded patch set 9
V +110/21/26, 08:44 -
Oli Bartsch uploaded patch set 10 10/21/26, 08:49
-
Oli Bartsch commented on patch set 9 10/21/26, 08:51
Feature-103594-AllowedFileExtensionsPerStorageAndFileMount.rst:87ReplyDone -
core-ci voted on patch set 9 V +1 10/21/26, 08:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111979
-
core-ci voted on patch set 10 V +1 10/21/26, 09:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111980
-
Georg Ringer commented on patch set 10 V -1 10/21/26, 18:11
way better. however if enabling [jpg,youtube], now it allowes to upload a youtube file which is however just a online media file extension. if no restriction is set, youtube is not in the list of files for allowed uploads -
Simon Schaufelberger commented on patch set 10 10/21/26, 18:19
Feature-103594-AllowedFileExtensionsPerStorageAndFileMount.rst:87Reply -
Oli Bartsch uploaded patch set 11
V +110/21/26, 19:26 -
Oli Bartsch commented on patch set 11 10/21/26, 19:29
Reply
Fixed -
core-ci voted on patch set 11 V +1 10/21/26, 19:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112038
-
Georg Ringer voted on patch set 11 CR +1 V +1 10/21/26, 19:45
-
Oli Bartsch uploaded patch set 12
CR +1V +110/24/26, 20:29 -
core-ci voted on patch set 12 V +1 10/24/26, 20:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112436
-
Simon Schaufelberger voted on patch set 12 CR +1 V +1 10/24/26, 20:56
-
Georg Ringer voted on patch set 12 CR +1 V +1 10/29/26, 16:16
-
Oli Bartsch voted on patch set 12 CR +2 V +2 10/29/26, 17:26
-
Oli Bartsch merged patch set 13 10/29/26, 17:26