Closed Bug 1655284 Opened 1 year ago Closed 1 year ago

OpenPGP e2ee interactive configuration not as expected, if external key is the only key

Categories

(MailNews Core :: Security: OpenPGP, defect, P1)

Tracking

(thunderbird_esr78 fixed, thunderbird78 wontfix, thunderbird79 affected, thunderbird80 fixed)

RESOLVED FIXED
81 Branch
Tracking Status
thunderbird_esr78 --- fixed
thunderbird78 --- wontfix
thunderbird79 --- affected
thunderbird80 --- fixed

People

(Reporter: KaiE, Assigned: aleca)

References

Details

(Keywords: ux-consistency)

Attachments

(1 file, 1 obsolete file)

Start with fresh settings.
Set mail.openpgp.allow_external_gnupg to true.
Go to account settings.
Add key, enter an external key ID, save key id.

Actual result:

It says "... doesn't have a personal key"
green checkmark
"... current configuration uses (entered key id)"
No selection list is shown. No "None" entry. No entry for the external key.

Expected result:

Thunderbird shouldn't say "doesn't have personal key"
A "None" entry should be shown.
A list entry should be shown for the external key.

Depends on: 1653300
Summary: OpenPGP e2ee prefs not as expected, if external key is the only key → OpenPGP e2ee interactive configuration not as expected, if external key is the only key
Status: NEW → ASSIGNED
Keywords: ux-consistency
Attached patch 1655284-openpgp-external.diff (obsolete) — Splinter Review

This should take care of the problem.

Attachment #9166382 - Flags: review?(kaie)
Comment on attachment 9166382 [details] [diff] [review]
1655284-openpgp-external.diff

Thanks.

Optional change, I think the following would be slightly easier to read (two places):

let allKeys = result.all.length + (externalKey ? 1 : 0);
Attachment #9166382 - Flags: review?(kaie) → review+

Of even this:

let externalKeyCount = gIdentity.getUnicharAttribute(
"last_entered_external_gnupg_key_id"
) ? 1 : 0;

let allKeys = result.all.length + externalKeyCount;

Thanks, patch updated.

Attachment #9166382 - Attachment is obsolete: true
Attachment #9166869 - Flags: review+

let allKeys = result.all.length + (externalKey ? 1 : 0);

I prefer this, I think it's more readable and we avoid defining an extra variable.

Target Milestone: --- → Thunderbird 80.0
Comment on attachment 9166869 [details] [diff] [review]
1655284-openpgp-external.diff

[Approval Request Comment]
Regression caused by (bug #): -
User impact if declined: Incorrect listing of external keys and inability to configure openpgp with only an external key.
Testing completed (on c-c, etc.): soon on c-c
Risk to taking this patch (and alternatives if risky): low as it only adds a condition to check for external key when the key list UI is updated.
Attachment #9166869 - Flags: approval-comm-esr78?
Attachment #9166869 - Flags: approval-comm-beta?
Target Milestone: Thunderbird 80.0 → 81 Branch
Comment on attachment 9166869 [details] [diff] [review]
1655284-openpgp-external.diff

Approved for beta.
Approved for esr78.
Attachment #9166869 - Flags: approval-comm-esr78?
Attachment #9166869 - Flags: approval-comm-esr78+
Attachment #9166869 - Flags: approval-comm-beta?
Attachment #9166869 - Flags: approval-comm-beta+

suggesting 79 wontfix

Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/aa19cd9cecf4
Fix e2e encryption configuration in Account Settings if only using an external key. r=KaiE

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.