86872[BUGFIX] Pass all MimeTypeValidator options when using FileUpload
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 4
- typo3/sysext/extbase/Classes/Mvc/Controller/FileUploadConfiguration.php+11 −1
- typo3/sysext/extbase/Classes/Validation/Validator/MimeTypeValidator.php+2 −0
- typo3/sysext/extbase/Tests/Unit/Reflection/ClassSchema/PropertyTest.php+3 −0
- typo3/sysext/extbase/Tests/Unit/Reflection/Fixture/DummyModel.php+3 −0
Review log 710
-
Jörg Hofrichter uploaded patch set 1 11/01/24, 22:40
-
core-ci voted on patch set 1 V -1 11/01/24, 22:47 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68962
-
Jörg Hofrichter uploaded patch set 2
V -111/01/24, 22:50 -
core-ci voted on patch set 2 V -1 11/01/24, 22:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68963
-
Jörg Hofrichter uploaded patch set 3
V -111/01/24, 23:15 -
core-ci voted on patch set 3 V +1 11/01/24, 23:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68964
-
Torben Hansen commented on patch set 3 CR -1 11/02/24, 09:24
Please see my comments in the issue. The suggestes solution adds the validator options as new options not coupled to the mime type validator. I'll check, if we can provide a better solution by instanitating the validator with all possible options in a new property and keep the old (and "wrong" / not fully customizable) option. Please also create a new patch for the MimeTypeValidator fix for the custom messages and add me as reviewer. This can then more easily be reviewed. -
Garvin Hicking commented on patch set 3 11/02/24, 10:24
Reply
I think having a shorthand notation with "allowedMimeTypes" can still be kept to not annoy early adopters of this feature, and adding the suggested "mimeType" additional array notation to configure the MimeTypeValidator would be flexible (and non-breaking). Maybe using "mimeTypeValidatorOptions" as the name of the array key could it make more cleanly. (Also, thanks a lot for spotting and adressing this, Jörg!) -
Torben Hansen commented on patch set 3 11/02/24, 13:14
I created a new patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/86873, which tries to resolve the problem by streamlining the validator configuration. Additionally, I created this https://forge.typo3.org/issues/105533 forge issue for the missing `$translationOptions` issue. There are actually 2 more validators affected. Feel free to create a patch for this issue or just ping me, if I should do. -
Jörg Hofrichter abandoned the change 11/02/24, 20:55
Addressed by patches 86873 and 86874