Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-3960

PGP encrypted files get detected as application/octet-stream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.0
    • 2.8.0
    • detector
    • None

    Description

      We use Tika for detecting and validating uploaded files using their content/magic bytes and not only their names/extension.

      Passing a PGP/GPG encrypted file to Tika.detect(InputStream stream) will always return application/octet-stream instead of application/pgp-encrypted defined in tika-mimetypes.xml

      The issue occurs because the application/pgp-encrypted mime-type defined in tika-mimetypes.xml is lacking a magic match and only has <glob pattern="*.pgp"/>

      I managed to fix the issue for us temporarily by adding application/pgp-encrypted including a magic match in our custom-mimetypes.xml file. I will create a Pull Request on Github with the fix to resolve the issue.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tayseersabha Tayseer Sabha
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: