- Issue created by @dakwamine
- Merge request !10187Issue #3487488 by dakwamine: ExtensionMimeTypeGuesser::guessMimeType must support file names with "0" (zero) like foo.0.zip โ (Open) created by dakwamine
- ๐บ๐ธUnited States smustgrave
Thank you for reporting
So fixes actually need to land in the development branch first (11.x).
If still an issue on 11.x then it's still valid.
Next step then would be to add test coverageThanks
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
This may be resolved with ๐ ExtensionMimeTypeGuesser::guessMimeType return less accurate MIME type when file extensions have multiple parts Active Are you able to test on 10.3.x?
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Ah looks like you did test on 10.3.x already. We will need a test to show the before and after with the fix.
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Rebased on 11.x, simplified the change, and added a test.
Confirmed the test-only pipeline failed:
There was 1 failure: 1) Drupal\KernelTests\Core\File\MimeTypeTest::testFileMimeTypeDetection Failed asserting that two strings are identical. --- Expected +++ Actual @@ @@ -'application/zip' +'application/octet-stream'
- Merge request !10195Issue #3487488 by dakwamine: ExtensionMimeTypeGuesser::guessMimeType must... โ (Closed) created by kim.pepper
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Created a new MR because I don't know how to properly rebase via the gitlab UI. ๐
- ๐ฎ๐นItaly mondrake ๐ฎ๐น
mondrake โ changed the visibility of the branch 3487488-extensionmimetypeguesserguessmimetype-must-support to hidden.
- ๐ฎ๐นItaly mondrake ๐ฎ๐น
Changed the comment since my earlier suggestion duplicated the word 'because' and was not compliant to the 80 chars line limit.
I think I can leave that to RTBC.
- ๐ซ๐ทFrance dakwamine
Hello. :) The updated fix looks good for me. Much simpler indeed. :D Many thanks for the hard work.
- ๐ฎ๐นItaly mondrake ๐ฎ๐น
I think this should go in the upcoming point releases - it fixes a bug introduced by a MR not released yet in 10.4 and 11.1, and the bug leads to data corruption.
-
longwave โ
committed 0475cecc on 10.3.x
Issue #3487488 by kim.pepper, mondrake, dakwamine, smustgrave:...
-
longwave โ
committed 0475cecc on 10.3.x
-
longwave โ
committed e539d9bf on 10.4.x
Issue #3487488 by kim.pepper, mondrake, dakwamine, smustgrave:...
-
longwave โ
committed e539d9bf on 10.4.x
-
longwave โ
committed 5c12effc on 10.5.x
Issue #3487488 by kim.pepper, mondrake, dakwamine, smustgrave:...
-
longwave โ
committed 5c12effc on 10.5.x
-
longwave โ
committed bc5e491c on 11.0.x
Issue #3487488 by kim.pepper, mondrake, dakwamine, smustgrave:...
-
longwave โ
committed bc5e491c on 11.0.x
-
longwave โ
committed d83ba02d on 11.1.x
Issue #3487488 by kim.pepper, mondrake, dakwamine, smustgrave:...
-
longwave โ
committed d83ba02d on 11.1.x
-
longwave โ
committed 393baa76 on 11.x
Issue #3487488 by kim.pepper, mondrake, dakwamine, smustgrave:...
-
longwave โ
committed 393baa76 on 11.x
- ๐ฌ๐งUnited Kingdom longwave UK
Great find, thanks for the fix and test. The previous change was committed to 10.3 and 11.0 so backporting this all the way down to there as an eligible bug fix.
Committed and pushed 393baa761cc to 11.x and d83ba02ddbb to 11.1.x and bc5e491c885 to 11.0.x and 5c12effc9e3 to 10.5.x and e539d9bf68d to 10.4.x and 0475ceccefc to 10.3.x. Thanks!