Closed Bug 1653311 Opened 4 years ago Closed 4 years ago

Enigmail determineSendFlags() fires too often at every mouse interaction

Categories

(MailNews Core :: Security: OpenPGP, defect)

defect

Tracking

(thunderbird_esr78 fixed, thunderbird79 fixed)

RESOLVED FIXED
Thunderbird 80.0
Tracking Status
thunderbird_esr78 --- fixed
thunderbird79 --- fixed

People

(Reporter: aleca, Assigned: KaiE)

Details

Attachments

(1 file)

The Enigmail integration added the determineSendFlags() method which checks if the encryption is possible for every written recipient.
https://searchfox.org/comm-central/rev/337b77d55861522d05198bf971b042e8ed129a04/mail/extensions/openpgp/content/ui/enigmailMsgComposeOverlay.js#1396

This method gets fired at every mouse click, blur, or focus on any addressing field, even the subject line, going through all the available pills, and constantly triggering the Recipients2CompFields() method.

This was probably necessary with the old implementation, but with the new pills feature, this check should only happen when a pill is created, and it should only check for the newly added address, without triggering the Recipients2CompFields() method, since that is already handled by the pill creation itself.

yes we should remove that. We currently don't have UI to continuously show the "can encrypt" state.

Assignee: nobody → kaie

The attached patch removes all event based calls to that function, and that means we can remove the handlers, too.

Only when sending an encrypted message we call the function.

This should be OK for now. Once we need this information more often, let's invent something new (and keep this removal patch in mind for future inspiration).

Just to clarify the purpose of these event handlers: they where implemented in order to determine the send flags while the user adds or deletes recipients, i.e. to determine dynamically, while typing, if the message will be encrypted or not.

Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/e3f2844a24eb
Only call OpenPGP composer determineSendFlags when necessary. r=PatrickBrunschwig

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

Comment on attachment 9164096 [details]
Bug 1653311 - Only call OpenPGP composer determineSendFlags when necessary. r=PatrickBrunschwig

[Approval Request Comment]
Regression caused by (bug #): OpenPGP code
User impact if declined: slower UI
Testing completed (on c-c, etc.): yes manually, composer still working
Risk to taking this patch (and alternatives if risky): Minimal, strictly limited to experimental OpenPGP code

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

Comment on attachment 9164096 [details]
Bug 1653311 - Only call OpenPGP composer determineSendFlags when necessary. r=PatrickBrunschwig

Approved for esr78 and beta - please land

Attachment #9164096 - Flags: approval-comm-esr78?
Attachment #9164096 - Flags: approval-comm-esr78+
Attachment #9164096 - Flags: approval-comm-beta?
Attachment #9164096 - Flags: approval-comm-beta+
Target Milestone: --- → Thunderbird 80.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: