Created attachment 87741 [details] [review]
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.
We tested this patch and it works as expected when used in the context of GNOME Seahorse.
Author: Jérémy Bobbio <email@example.com>
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.
Created attachment 115788 [details]
Example encrypted message .asc file detected as plain text
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.
Sorry. I am going to file a new bug report instead.