Bug 70539 - All .asc files are recognized as OpenPGP files
Summary: All .asc files are recognized as OpenPGP files
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Shared Mime Info group
QA Contact:
Depends on:
Reported: 2013-10-16 16:30 UTC by Jérémy Bobbio
Modified: 2015-05-15 01:34 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

patch v1 (2.39 KB, patch)
2013-10-16 16:30 UTC, Jérémy Bobbio
Details | Splinter Review
Example encrypted message .asc file detected as plain text (3.74 KB, text/plain)
2015-05-15 01:27 UTC, rewarp

Description Jérémy Bobbio 2013-10-16 16:30:22 UTC
Created attachment 87741 [details] [review]
patch v1

I made a mistake in 2c3438c. As all weights are currently equal for *.asc files, we now recognize unrelated files as OpenPGP stuff.

The attached patch fixed the issue in my tests.
Comment 1 Tails developers 2013-10-21 16:13:41 UTC
We tested this patch and it works as expected when used in the context of GNOME Seahorse.
Comment 2 Jérémy Bobbio 2013-12-03 08:46:56 UTC
Any news?
Comment 3 Bastien Nocera 2013-12-13 15:48:20 UTC
commit 4f33cfd52a4a794f9dfeb2e53b788780d5d3f1c5
Author: Jérémy Bobbio <lunar@debian.org>
Date:   Wed Oct 16 11:12:28 2013 +0200

    Do not recognize all .asc files as application/pgp-encrypted
    The change introduced in 2c3438c had the unfortunate effect of having all .asc
    be identified as application/pgp-encrypted. As this should only happen when
    we can identify armor headers, we now give a lower weight than text/plain to
    the *.asc glob for OpenPGP MIME types.
Comment 4 rewarp 2015-05-15 01:27:00 UTC
Created attachment 115788 [details]
Example encrypted message .asc file detected as plain text
Comment 5 rewarp 2015-05-15 01:33:06 UTC
I have a *.asc encrypted message that is detected as plain-text. I was told to file a bug report here from the KDE bug tracker.


To summarise, the file that I have attached is opened as a plain text file by default. I removed *.asc association with plain-text files to get it recognised as a GPG-encrypted message.

Re-adding *.asc as a recognised filetype for plain-text documents returns the erroneous recognition.
Comment 6 rewarp 2015-05-15 01:34:48 UTC
Sorry. I am going to file a new bug report instead.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.