Problem/Motivation
Symfony providers two mime guessers FileinfoMimeTypeGuesser
and FileBinaryMimeTypeGuesser
which do a better and more secure job than ExtensionMimeTypeGuesser.
If either are supported we should add them to Drupal\Core\File\MimeType\MimeTypeGuesser
with a preference for FileinfoMimeTypeGuesser
.
Beta phase evaluation
Issue priority | Major because using fileinfo or the file command represents a security improvement over the extension based guessing. |
---|---|
Prioritized changes | The main goal of this issue is security. |
Disruption | Whilst this removes a hook from core this hook is only used by the File Entity module in Drupal 7 (Looking at http://drupalcontrib.org/api/drupal/drupal%21modules%21system%21system.a...). All the additional maapins it adds are in Drupal 8 so this is not necessary since #1443070: Add support for popular e-book formats, Google web formats, mkv and mka in file_default_mimetype_mapping() landed. |
Proposed resolution
Remaining tasks
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Reroll the patch if it no longer applies. | Instructions |