forwarded OpenPGP-signed message (.eml) does not open
Categories
(MailNews Core :: Security: OpenPGP, defect)
Tracking
(thunderbird_esr128 affected, thunderbird136 affected)
People
(Reporter: pmenzel+bugzilla.mozilla.org, Assigned: KaiE)
References
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0
Steps to reproduce:
Debian sid/unstable with thunderbird 1:128.6.0esr-1
Try to view the forwarded message in the attached message in Thunderbird 128. (Note, that opening it using Thunderbirds dialog mangles up the message content leading to the confusion in bug 1933439 URL. Open the attached message is source view to verify.)
Actual results:
The message is not rendered.
Expected results:
The message should have been rendered.
Updated•10 months ago
|
Comment 1•9 months ago
|
||
The attachment doesn't display for me using nightly build on mac
Comment 2•9 months ago
|
||
With Display Attachments Inline, the message shows (inline).
But I can confirm double click to open does nothing. "Open And Show" button in the notification also does nothing.
| Assignee | ||
Comment 3•9 months ago
|
||
I can reproduce also using fresh, minimal messages that I created.
Removing the signature causes it load fine.
Removing the protected headers wrapper doesn't have an effect.
I'll attach a smaller sample that has the protected headers layer removed, and which still can be used to reproduce the bug.
| Assignee | ||
Comment 4•9 months ago
|
||
| Assignee | ||
Comment 5•9 months ago
|
||
Updated•9 months ago
|
| Reporter | ||
Comment 6•9 months ago
|
||
As I do not see a commit message and out of curiosity: What was the problem?
| Assignee | ||
Comment 7•9 months ago
|
||
(In reply to Paul Menzel from comment #6)
As I do not see a commit message and out of curiosity: What was the problem?
To view the attached message, our code will attempt to extract that message in a first step, and then it will request the display of the extracted message in a second step.
Extracting or displaying a message runs through the same code, based on the MIME type. There are some parameters given to the processing code, that inform about the intention of the processing.
The code that handles an multipart/signed MIME part with with OpenPGP protocol wasn't yet able to perform the raw extraction. Instead, it tried to perform the usual "analytic" processing, in which it removed the signature part, and ran through the decision logic about the signature status of that MIME part (which was ignored, because that part wasn't yet used as the top level of a window, when going through the first extraction step).
As a result of the above, the extracted message had an invalid structure. It looked like this:
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature";
boundary="------------37y3af86ecPgBEzVTDXuXNnx"
Content-Type: multipart/mixed; boundary="------------JqOOnYJ5YcXdPiMJ6jiOvgJS"
Content-Disposition: inline
--------------JqOOnYJ5YcXdPiMJ6jiOvgJS
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
c2lnbmVkIG1lc3NhZ2UNCg0K
--------------JqOOnYJ5YcXdPiMJ6jiOvgJS--
That was the input that was given to the second step. That couldn't work. The outer part still claimed it was a signed message. But the rest of the structure didn't meet the expectation of the code. There was no second outer MIME part containing the signature. Because of the wrong format, the code processing the MIME part ran into an error condition and decided to stop processing it without a result text, and therefore no text was displayed.
The fix enhances the processing of the multipart/signed type to notice the request to return a raw message (as requested by the first step). When the modified code detects that scenario, it will skip all analytic processing, and just return the whole MIME part. When that MIME part is then passed to rendering, it will run again through the same MIME type handler, but this time it's a complete MIME message with a correct structure, and the processing code sees the expected structure and can complete without failure.
| Reporter | ||
Comment 8•9 months ago
|
||
Thank you. Now even I understood it. Thank you for the analysis and fix.
| Assignee | ||
Updated•9 months ago
|
Comment 10•9 months ago
|
||
Pushed by john@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/2b46b7764bc3
Fix viewing of attached signed OpenPGP messages. r=mkmelin
Updated•8 months ago
|
Description
•