Validate attachment MIME type before storing it in the database(Jira cloud)

XMLWordPrintable

    • 5
    • Severity 3 - Minor

      Issue Summary

      When certain file extensions are stored in Jira issues as attachments they could be considered as media files and not their original extension. This could cause issues when downloading the files using Firefox.

      Using a previously reported issue:

      Relying on MIME type information regarding JIRA issue attachments supplied by browsers can often be unreliable, causing JIRA to store attachment data with wrong MIME types in the database. This could lead to minor issues on how this attachments should be handled when downloading from the issue since the content-header is set wrongly based on the wrong MIME type recorded in the database.

      Suggested Solution:

      A minor validation e.g. based on known file extensions should be used to determine the most appropriate file type when storing attachment data.

      As an example of the issue, we used a .dmp file in the attachment section and it is listed with a "music" icon.

      Steps to Reproduce

      1. Upload a .dmp file as a Jira issue attachment;
      2. The icon for the .dmp file is a 🎵;
      3. Download the file using Firefox;
      4. The file will be converted as a .mp3 file.

      Expected Results

      The file should be stored as .dmp and not considered as a .mp3 when being downloaded with Firefox.

      Actual Results

      The .dmp is converted to a .mp3 file causing some confusion for Jira users.

      In Firefox the file is converted to .mp3.

      Workaround

      • Using another browser like Safari or Chrome.
      • Use a Firefox browser extension such as Content-Type Fixer in order to change the default action when downloading this filetype

        1. Screenshot 2023-08-17 at 2.47.15 pm.png
          38 kB
          Ricardo N
        2. Screenshot 2023-08-17 at 2.56.21 pm.png
          47 kB
          Ricardo N
        3. Screenshot 2023-08-17 at 2.56.31 pm.png
          42 kB
          Ricardo N

              Assignee:
              Unassigned
              Reporter:
              Ricardo N (Inactive)
              Votes:
              6 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: