89603[BUGFIX] Evaluate mixed-case file extensions in mime_type migration
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Stefan Bürk +1
- Oliver Hader +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Stefan Bürk +1
- Oliver Hader +1
- core-ci +1 CI
Issues 2
Files 1
Review log 1315
-
Garvin Hicking uploaded patch set 1 06/02/25, 10:55
-
Ivan Dharma Kartolo voted on patch set 1 CR +1 06/02/25, 11:01
-
core-ci voted on patch set 1 V +1 06/02/25, 11:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79744
-
Benjamin Franzke uploaded patch set 2
CR +1V +106/03/25, 06:49 -
Benjamin Franzke commented on patch set 2 06/03/25, 06:49
-
core-ci voted on patch set 2 V +1 06/03/25, 06:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79788
-
Garvin Hicking commented on patch set 2 06/03/25, 09:30
SysFileMimeTypeMigration.php:115ReplyThe way I understood this is that the Mimetype there is a user input, so users may input/configure something like "Text/CSV"? According to IANA, Mimetypes are case insensitive, and only lowercase by convention, not mandatory. So IMO we should probably normalize this? -
Benjamin Franzke commented on patch set 2 06/03/25, 10:04
SysFileMimeTypeMigration.php:115Replythe mime_type is detected, not user input. The extension is user input (as it is encoded within the user-provided filename), therefore that could be uppercase, but mime_type was always the one detected within the file contents, therefore it's not uppercase (would only be the case if finfo_file/mime_content_type would report uppercase, which they do not do – otherwise case our new mime_type-has-to-match-extension assertion would already fail during persistence of the file) -
Garvin Hicking commented on patch set 2 06/03/25, 12:54
SysFileMimeTypeMigration.php:115ReplyWhat I meant was the array from getMimeTypeCompatibilityList(). This is populated with data from $GLOBALS['TYPO3_CONF_VARS']['SYS']['FileInfo']['mimeTypeCompatibility'] - which I referred to as "user input". Sorry for the impreciseness. -
Benjamin Franzke commented on patch set 2 06/10/25, 06:26
SysFileMimeTypeMigration.php:115ReplyUnderstood, thx. I'd still like to consider that all lowercase, as there is no reason (besides this bug which we're fixing now) that one would configure uppercase extension or mime types. We normalize to lowercase. So I think we're good here with this adaption, thanks! -
Garvin Hicking commented on patch set 2 06/10/25, 07:09
SysFileMimeTypeMigration.php:115ReplyAlright. Just wanted to be sure and my reasoning came across. I'm good with this then! -
Stefan Bürk voted on patch set 2 CR +1 V +1 06/10/25, 07:57
-
Oliver Hader voted on patch set 2 CR +1 V +1 06/10/25, 08:25
-
Benjamin Franzke voted on patch set 2 CR +2 V +2 06/10/25, 08:26
-
Benjamin Franzke merged patch set 3 06/10/25, 08:26
SysFileMimeTypeMigration.php:115