Closed Bug 1657245 Opened 4 years ago Closed 4 years ago

Encryption status shown incorrectly for some replies to encrypted messages

Categories

(MailNews Core :: Security: OpenPGP, defect)

defect

Tracking

(thunderbird_esr78 fixed, thunderbird80 fixed)

RESOLVED FIXED
81 Branch
Tracking Status
thunderbird_esr78 --- fixed
thunderbird80 --- fixed

People

(Reporter: KaiE, Assigned: KaiE)

Details

Attachments

(1 file)

enigmailMsgComposeOverlay.js function decryptQuote calls nsISelectionController.completeMove.

I see an exception from that function, when replying to certain encrypted messages, but some work fine. I don't yet understand the differences that trigger the failure.

This has a bad side effect. When replying to an encrypted message, processing is interrupted, and we don't reach the code that enables encryption for the reply.

Assignee: nobody → kaie
Status: NEW → ASSIGNED

After testing the potential fix (wrapping the failing call into try/catch), I still saw the symptom.

But my previous report of the symtop was wrong.

Encryption IS actually enabled correctly. But the user interface isn't showing it!

For some reason, the status bar doesn't show the encryption icon. However, when opening the menu, it shows that encryption is enabled.

My earlier interpretation was incorrect. We do enable the flag to encrypt.
The missing status bar feedback is caused by bad timing of events.

We only call setEncSigStatusUI once, from ComposeLoad and adjustSignEncryptAfterIdentityChanged.

With the problematic message, there is a double encoding. We have inline OpenPGP. And that inline OpenPGP uses a base64 content transfer encoding.

When replying, initially the base64 encoding is decoded and the BEGIN PGP message is loaded (and temporarily shown) into the composer window. Then it is automatically decrypted.

This series of events means that the message properties are known at a later time, after the initial call to setEncSigStatusUI.

Ok, the only problem is that the display isn't updated after the last processing step.

Summary: Failure to enable encryption for a reply, because calling editor.selectionController.completeMove fails → Encryption status shown incorrectly for some replies to encrypted messages
Attachment #9168036 - Attachment description: Bug 1657245 - Failure to enable encryption for a reply, because calling editor.selectionController.completeMove fails. r=PatrickBrunschwig → Bug 1657245 - Encryption status shown incorrectly for some replies to encrypted messages. r=PatrickBrunschwig
Attachment #9168036 - Attachment description: Bug 1657245 - Encryption status shown incorrectly for some replies to encrypted messages. r=PatrickBrunschwig → Bug 1657245 - Encryption status shown incorrectly for some replies to encrypted messages. r=mkmelin

Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/c5124f13d00b
Encryption status shown incorrectly for some replies to encrypted messages. r=mkmelin DONTBUILD

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/a10b7ee9fb6b
Follow-up to fix lint. rs=lint DONTBUILD
Target Milestone: --- → 81 Branch

phab updated to include lint fix

Comment on attachment 9168036 [details]
Bug 1657245 - Encryption status shown incorrectly for some replies to encrypted messages. r=mkmelin

OpenPGP correctness fix. No risk

Attachment #9168036 - Flags: approval-comm-esr78?
Attachment #9168036 - Flags: approval-comm-beta?

Comment on attachment 9168036 [details]
Bug 1657245 - Encryption status shown incorrectly for some replies to encrypted messages. r=mkmelin

[Triage Comment]
Approved for beta

Attachment #9168036 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9168036 [details]
Bug 1657245 - Encryption status shown incorrectly for some replies to encrypted messages. r=mkmelin

[Triage Comment]
Approved for esr78

Attachment #9168036 - Flags: approval-comm-esr78? → approval-comm-esr78+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: