Closed Bug 1651808 Opened 4 years ago Closed 4 years ago

OpenPGP only manageable for default mail "identity"

Categories

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

Tracking

(thunderbird_esr78 fixed, thunderbird79 fixed)

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

People

(Reporter: fernm, Assigned: aleca)

Details

Attachments

(3 files, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

TB 78 Beta 4 on Debian 64 Bit (upgraded from TB 68.9 from Debian Distro)

I have a mail main account and several "identities" associated with it (mail aliases at the mail provider side).

I imported two pre-existing private keys from gnupg into TB78. One for the mail account default identity, and the other key for one of an additional non-default identity.

TB detected the key for the account default identity and I could set it up to use for OpenPGP (assign key), see screenshot.

The I click on Account settings -> Manage Identities -> <select the non-default identity> -> Edit -> End-to-End Encryption

Actual results:

I see "OpenPGP None", no key associated ( see screenshot).

Expected results:

There should be shown the matching key for the non-default identity mail-address, and OpenPGP should be enabled.

Now I tested some things if I could get a workaround. I klicked "Add Key" in the "edit non-default identity" and "Generate key" (since "import" does not work).
Than for temporarily, the key is shown with the non-default identity. But when clicking forth and back to the main account etc. then the new generated key is again not assiciated with the non-default identity anymore.

Then I figured out that I can enable OpenPGP with the matching key only for an identity if the identity is set as default.

If I then edit the previous default and now non-default identity then there is the key association also lost and "OpenPGP None" is shown.

But when I set it as default again, the key association is there again.

So it looks like key/encryption management for non-defaul identities does not work. I am surprised this is the case for Beta 4 since having several identities is a basic use case I think?

key is not seen, OpenPGP disabled

Even when You navigate to account settings -> manage identities -> <select the bold written default identity> -> Edit -> End-to-end Encryption: "OpenPGP: None" (see second screenshot)

While in the main account setting -> End-to-end Encryption OpenPGP is enabled for the default identity (see first screenshot)

Assignee: nobody → alessandro
Status: UNCONFIRMED → NEW
Ever confirmed: true

With my latest local build, I see an exception that Preferences is undefined.
I have a patch for that, and that seems to help, the key for the secondary identity is shown.

However, I still get an exception in am-e2e.js from the following code, which says ".on is not a function".

  Preferences.get(`mail.identity.${gIdentity.key}.openpgp_key_id`).on(
    "change",
    updateOpenPgpSettings
  );
Attached patch 1651808-v1.patch (obsolete) — Splinter Review
Status: NEW → ASSIGNED
Priority: -- → P1

We were missing the preferenceBindings.js from the dialog.

Attachment #9163552 - Attachment is obsolete: true
Attachment #9163568 - Flags: review?(kaie)
Attachment #9163568 - Flags: review?(kaie) → review+
Target Milestone: --- → Thunderbird 80.0
Comment on attachment 9163568 [details] [diff] [review]
1651808-openpgp-identities.diff

[Approval Request Comment]
Regression caused by (bug #): -
User impact if declined: Unable to manage OpenPGP personal key from the edit identity subdialog.
Testing completed (on c-c, etc.): soon on c-c
Risk to taking this patch (and alternatives if risky): Low as the patch only adds a missing javascript file from the dialog.
Attachment #9163568 - Flags: approval-comm-esr78?
Comment on attachment 9163568 [details] [diff] [review]
1651808-openpgp-identities.diff

let's keep beta in sync, too
Attachment #9163568 - Flags: approval-comm-beta?

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/ff06f1dd05d5
Fix OpenPGP key identity manager for non-default identities. r=KaiE

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

Confirm: Works for me now with Build 20200716204135

Comment on attachment 9163568 [details] [diff] [review]
1651808-openpgp-identities.diff

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

Attachment

General

Creator:
Created:
Updated:
Size: