Decrypt attachment filenames (currently only "Attachment1 [details] [diff]" file name is shown)
Categories
(MailNews Core :: Security: OpenPGP, enhancement)
Tracking
(Not tracked)
People
(Reporter: kg, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0
Steps to reproduce:
From one of our clients we recieve encrpyted email with attachments whose filename are encrypted. The encrypted attachment is attached with a generic name (Attachment1 [details] [diff].pgp). I don't know the technical details, but the original filename must be part of the encrypted file. I can reveal it using the gpg2 command line tool with:
❯ cat Attachment1.pgp | gpg2 --status-fd 2 --decrypt > /dev/null
...
[GNUPG:] BEGIN_DECRYPTION
[GNUPG:] DECRYPTION_INFO 2 9 0
[GNUPG:] PLAINTEXT 62 0 2021_03_22_Project.pdf
[GNUPG:] DECRYPTION_OKAY
[GNUPG:] GOODMDC
[GNUPG:] END_DECRYPTION
This is what Enigmail was using.
Weirdly enough they also add the filename as plaintext header to the E-Mail:
X-Content-PGP-Universal-Saved-Content-Transfer-Encoding: base64
X-Content-PGP-Universal-Saved-Content-Disposition: attachment;
modification-date="Thu, 08 Apr 2021 14:14:35 GMT";
creation-date="Thu, 08 Apr 2021 14:14:11 GMT"; size=338436;
filename="Attachment1.pgp"
X-Content-PGP-Universal-Saved-Content-Description: 2021_03_22_Project.pdf
X-Content-PGP-Universal-Saved-Content-Type: application/pdf;
name="Attachment1.pgp"
Content-Type: application/octet-stream;
name="Attachment1.pgp"
Content-Disposition: attachment;
filename="Attachment1.pgp"
Actual results:
Thunderbird only ever shows Attachment1 [details] [diff] filename. (Enigmail at least revealed the original name when using "Decrypt and save as...")
Expected results:
Show the original filename as early as possbile.
Updated•4 years ago
|
Is there a hook for plugins to rename attachments in messages? I tried to assign name
and contentType
in MessagePart with no luck.
Updated•4 years ago
|
I managed to write an addon to work around that: https://github.com/kgraefe/thunderbird-pgp-universal
Description
•