listAttachments() is empty for encrypted messages
Categories
(Thunderbird :: Add-Ons: Extensions API, defect)
Tracking
(thunderbird128 fixed)
Tracking | Status | |
---|---|---|
thunderbird128 | --- | fixed |
People
(Reporter: tim.heithecker, Assigned: TbSync)
References
Details
(Whiteboard: [PrioESR128])
Attachments
(3 files, 1 obsolete file)
681 bytes,
application/x-xpinstall
|
Details | |
1.59 KB,
application/octet-stream
|
Details | |
48 bytes,
text/x-phabricator-request
|
wsmwk
:
approval-comm-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0
Steps to reproduce:
Execute messages.listAttachments
with the id of an encrypted message that has attachments.
E.g. as in the “background.js” file of the attached add-on:
messenger.messageDisplay.onMessageDisplayed.addListener((tab, message) => {
messenger.messages.listAttachments(message.id).then(console.debug)
})
Actual results:
The returned array is empty. It does not contain the attachments.
I also tried version 118.0b3 and got the same results.
Expected results:
The returned array should contain the attachments. Just like it worked in older versions and still works for unencrypted messages.
Comment 1•1 year ago
|
||
I am seeing this problem too, but with unencrypted emails.
It seems that emails where a PDF file is attached with the Content-Type: application/octet-stream are not properly listed in the listAttachments function, even though they are listed in the attachment pane when opening the email.
An example email where this occurs (with private information removed) is attached.
Comment 2•1 year ago
|
||
Assignee | ||
Comment 3•9 months ago
|
||
Depends on D202210
Updated•9 months ago
|
Assignee | ||
Comment 4•6 months ago
|
||
I will work on this within the next few weeks. The groundwork has been done. We need to fix Bug 1882832 and then this can be implemented.
Assignee | ||
Comment 5•5 months ago
|
||
This is a regression from switching to the MimeTreeEmitter. The old
implementation always tried to decrpypt the message for attachment
extraction. The new implementation did not, which is fixed by this patch.
This also adds an extended test to actually check listAttachments() on
an encrypted message (including nested messages).
Note: getRaw() and getFull() have an option to work on the original or
on the decrypted message. This patch does not add the same option for
listAttachments(). We currently do not handle encrypted parts as
"attachments" (this is why listAttachments() did not return the
raw encrypted part before this patch) and there has not been a request
to access the raw enrcrypted part. We may come back to this at a later time.
The changes in utils.js
are fixing an incomplete type check. Only
boolean
, number
and string
variables where type checked,
but not date
for example. This patch also adds some more verbose
output to make it easier to track errors.
Updated•5 months ago
|
Assignee | ||
Updated•5 months ago
|
Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/44bca50b447a
Fix listAttachments() being empty for encrypted messages. r=mkmelin
Assignee | ||
Comment 7•5 months ago
|
||
Comment on attachment 9406249 [details]
Bug 1852746 - Fix listAttachments() being empty for encrypted messages. r=#thunderbird-reviewers
[Approval Request Comment]
Regression caused by (bug #): Regression from switching to a different parser method
User impact if declined: listAttachments() does not return attachments of encrypted messages
Testing completed (on c-c, etc.): a few days (missed landing on 128 by a few days)
Risk to taking this patch (and alternatives if risky): Low
Comment 8•5 months ago
|
||
Comment on attachment 9406249 [details]
Bug 1852746 - Fix listAttachments() being empty for encrypted messages. r=#thunderbird-reviewers
[Triage Comment]
Approved for beta
Comment 9•5 months ago
|
||
bugherder uplift |
Thunderbird 128.0b2:
https://hg.mozilla.org/releases/comm-beta/rev/bbcf34624146
Description
•