Skip to content

Replace mimemagic dependency and introduce a Gitlab::Utils::MimeType class

Robert May requested to merge remove-direct-mimemagic-dependency into master

What does this MR do?

Replaces our direct usage of mimemagic with the gem ruby-magic. However it uses libmagic under the covers, which can vary per system. So we need to include our own version which pulls the source and compiles it. See ruby-magic!1 (merged)

Note: this MR is built on top of !57421 (merged), which adds the base support for Gitlab::Utils::MimeType. That MR needs to be merged first.

Related #325851 (closed)

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Luke Duncalfe

Merge request reports