86873[TASK] Streamline MimeTypeValidator option handling in FileUpload
Commit message
Review
-
Code review CR +2 Done
- Garvin Hicking +2
- Jörg Hofrichter +1
- Benni Mack +1
-
Verified V +2 Done
- Garvin Hicking +2
- Jörg Hofrichter +1
- core-ci +1 CI
Issues 2
Files 11
- typo3/sysext/core/Documentation/Changelog/13.3/Feature-103511-IntroduceExtbaseFileUploadHandling.rst+33 −7
- typo3/sysext/extbase/Classes/Mvc/Controller/FileUploadConfiguration.php+11 −2
- typo3/sysext/extbase/Classes/Validation/Validator/MimeTypeValidator.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/file_upload/Classes/Domain/Model/Dto/FileUploadObjectStorageUploadedFile.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/file_upload/Classes/Domain/Model/FileReferencePropertyMultiple.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/file_upload/Classes/Domain/Model/FileReferencePropertySingle.php+1 −1
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/file_upload/Classes/Domain/Model/FileUploadMultipleProperties.php+2 −2
- typo3/sysext/extbase/Tests/Functional/Mvc/Controller/FileHandlingServiceConfigurationTest.php+152 −1
- typo3/sysext/extbase/Tests/Unit/Mvc/Controller/FileUploadConfigurationTest.php+14 −0
- typo3/sysext/extbase/Tests/Unit/Reflection/ClassSchema/PropertyTest.php2+3 −0
- typo3/sysext/extbase/Tests/Unit/Reflection/Fixture/DummyModel.php+3 −1
Review log 1925
-
Torben Hansen uploaded patch set 1 11/02/24, 12:49
-
core-ci voted on patch set 1 V -1 11/02/24, 12:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68977
-
Torben Hansen uploaded patch set 2
V -111/02/24, 12:58 -
core-ci voted on patch set 2 V +1 11/02/24, 13:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68978
-
Garvin Hicking commented on patch set 2 11/02/24, 17:16
Important-105532-StreamlineMimeTypeValidatorOptionHandlingInFileUpload.rst:24How should we proceed with the "old" key? Maybe something like: For now, the shorthand notation of only specifying "allowedMimeTypes" remains available, too. Only the long notation will be utilized, if both keys are present.Important-105532-StreamlineMimeTypeValidatorOptionHandlingInFileUpload.rst:48Add in here the other mimeTyeeValidstor options as an example, to showcase the benefit of the migration instead of using the same festure?PropertyTest.php:379We should add test cases here utilizing the other config keys here? (enshuring that these work are not in the scope of these tests, just the availibility of the other keys) -
Jörg Hofrichter commented on patch set 2 CR +1 V +1 11/02/24, 21:24
Functionally wise, the change works for me (applied this patch as well as patch 86874 and successfully tested setting "notAllowedMessage"). Regarding further improvements, I refer to the comments of Garvin Hicking. -
Torben Hansen uploaded patch set 3
CR +1V +111/03/24, 06:27 -
Torben Hansen commented on patch set 3 11/03/24, 06:28
Important-105532-StreamlineMimeTypeValidatorOptionHandlingInFileUpload.rst:6ReplyDoneImportant-105532-StreamlineMimeTypeValidatorOptionHandlingInFileUpload.rst:24ReplyDoneImportant-105532-StreamlineMimeTypeValidatorOptionHandlingInFileUpload.rst:48ReplyThe before and after example should use the same options to avoid confusion. I added an additional exampe at the end of the RST, which shows how to use validator options.PropertyTest.php:379ReplyThe tests there only assure, that the class schema correctly retrieves the `FileUpload` configuration array. Array subkeys are not scope of the test and in terms of the `validation` key, basically all given subkeys are accepted. -
core-ci voted on patch set 3 V +1 11/03/24, 06:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68995
-
Garvin Hicking commented on patch set 3 11/03/24, 09:14
Thanks Torben, that all works our for me and the added tests ensure the behavior that was important to me!Important-105532-StreamlineMimeTypeValidatorOptionHandlingInFileUpload.rst:65Following your previous advise I'd set this to false so that people won't copy&paste this as a security issue? :) -
Benni Mack commented on patch set 3 11/04/24, 09:01
please merge the Important.RST with the existing feature 13.3 RST -
Garvin Hicking uploaded patch set 4
V +111/04/24, 09:11ReST changes positive test -
Garvin Hicking commented on patch set 4 11/04/24, 09:14
I've reworked this patch slightly: * Added more info on the used validators * Notice about shorthand usage * Use all configuration options in the example * Added two positive tests that allow uploading a text/plain fileImportant-105532-StreamlineMimeTypeValidatorOptionHandlingInFileUpload.rst:65ReplyDone -
core-ci voted on patch set 4 V +1 11/04/24, 09:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69020
-
Garvin Hicking commented on patch set 4 CR -1 11/04/24, 09:28
on it -
Garvin Hicking uploaded patch set 5
CR -1V +111/04/24, 09:41Unify ReST files into one -
Garvin Hicking voted on patch set 5 CR +1 V +1 11/04/24, 09:42
-
core-ci voted on patch set 5 V +1 11/04/24, 09:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69024
-
Garvin Hicking commented on patch set 6
CR +1V +111/04/24, 10:01Published edit on patch set 5. -
core-ci voted on patch set 6 V +1 11/04/24, 10:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69026
-
Jörg Hofrichter commented on patch set 6 CR +1 V +1 11/04/24, 12:22
Successfully verified patchset 6, setting the notAllowedMessage option to a custom message -
Garvin Hicking voted on patch set 6 CR +1 V +1 11/04/24, 13:26
-
Benni Mack voted on patch set 6 CR +1 11/04/24, 13:42
-
Garvin Hicking voted on patch set 6 CR +2 V +2 11/04/24, 13:43
-
Garvin Hicking merged patch set 7 11/04/24, 14:26
Important-105532-StreamlineMimeTypeValidatorOptionHandlingInFileUpload.rst:6