In TB composer, refresh recipient encryption status and key assistant on external OpenPGP key changes
Categories
(MailNews Core :: Security: OpenPGP, defect, P1)
Tracking
(thunderbird_esr91 unaffected)
Tracking | Status | |
---|---|---|
thunderbird_esr91 | --- | unaffected |
People
(Reporter: KaiE, Assigned: KaiE)
References
(Blocks 2 open bugs)
Details
Attachments
(2 files)
The initial work for bug 1627956 (landed in bug 1764324),
added notification elements to the composer window.
If encryption is enabled, but encryption is impossible because of missing keys/certificates, we highlight the problematic recipients in yellow color, and we show a notification bar that mentions that encryption isn't possible.
The problem is:
If changes to keys/certificates keys are made in another window, the status isn't updated.
For example, if composer complains about a recipient, and the user opens the OpenPGP key manager and fixes the issue, and the user then returns to the composer window, we still complain that sending isn't possible.
The reverse scenario is also true: If composer thinks that everything is fine, but the user disables a key in OpenPGP key manager (or refreshes they key, resulting in a key now being revoked), and then the user returns to the composer window, then composer will not report the inability to send.
To fix this issue, we should refresh the key status each time focus moves back to the composer window, and update the status shown accordingly.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Fixing this isn't as easy as I had hoped.
I experimented with the "focus" and "focusout" events.
If the focus is on the composer's message editor, and I switch between the composer window and other windows, then I don't see any focus events triggered!
Does that mean we need to watch for focus events on the editor sub-element, too?
Are there other elements that we would have to watch, to ensure we catch the window focus event, regardless of which element in the window has focus?
Assignee | ||
Comment 2•2 years ago
|
||
I have the impression the "focus" approach is too difficult/involved.
It might be better to use a broadcast/observing approach, that is triggered whenever any pgp key changes, gets added, gets deleted, or if any acceptance changes.
Assignee | ||
Comment 3•2 years ago
|
||
I have a fix that uses the broadcast/observer approach, which fixes the scenarios of this bug, and also of bug 1765977, so let's merge the bugs.
Assignee | ||
Comment 5•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 6•2 years ago
|
||
Depends on D144752
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/bffeb4e58a94
Refresh key assistant views after viewing key details. r=mkmelin
https://hg.mozilla.org/comm-central/rev/d671d57c328d
Automatic refresh of encryption status in composer after OpenPGP key change events. r=mkmelin
Description
•