messenger.listAttachments fails to return attachments when the attachment is PGP encrypted named after message.asc
The messenger.messages.listAttachments() function fails when an email without a body that has an encrypted attachment named "message.asc" is included. There's no other information included and requires user to have the appropriate PGP key imported before having access to the attachment. It is fair but I think there should be a flag/option called "decrypt" similar to https://webextension-api.thunderbird.net/en/latest/messages.html#getfull-messageid-options.
Context: We are developing a PGP Mail Extension for Thunderbird and this prevents us from accessing the encrypted attachment and requires us to import the PGP private key just to access the file. I am expecting to at least let us access the encrypted "message.asc" file and proceed process without requiring to have the PGP key imported into the Thunderbird.
Steps to reproduce:
1. PGP encrypt a message and save it to message.asc. 2. Send the message using Thunderbird client as follow: - add a subject. - add the message.asc as an attachment. - leave the email body blank. - send the email. 3. Install a debug attachment that uses `messenger.messages.listAttachments()` and noticed that it won't return any attachments at all. The error will say, error decrypting message x (where x is messageId) even though the error actually happens in messenger.messages.listAttachments(x) and messages.getFull() uses decrypt set to "true" option.
Reference: https://webextension-api.thunderbird.net/en/latest/messages.html#listattachments-messageid
All Replies (1)
I also want to add that I do not have PGP keys imported in my accounts in Thunderbird so I think this would be one of a good reason for letting extensions handle decryption otherwise there's no visible hint as to why messages.listAttachments().
Gewysig op