Closed Bug 1778939 Opened 2 years ago Closed 2 years ago

Public key not automatically attached after enabling encryption (and signing) from "can encrypt" reminder

Categories

(MailNews Core :: Security: OpenPGP, defect)

Thunderbird 102
defect

Tracking

(thunderbird_esr102+ fixed, thunderbird103 fixed)

RESOLVED FIXED
104 Branch
Tracking Status
thunderbird_esr102 + fixed
thunderbird103 --- fixed

People

(Reporter: fernm, Assigned: KaiE)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Steps to reproduce:

  • In OpenPGP settings have activated "Enable encryption for new mails" + "Automatically attach my public key file when signing"
  • Receive an unencrypted+unsigned mail from address for which you have a valid public key
  • Reply to that mail (composer opens)
  • On the bottom there is a note "Encryption possible" and a button "Encrypt" (which is great !)
  • Click button "Encrypt" -> The encryption toggle button on the upper left of the composer window activates, and in the OpenPGP menu right beside "Digitally sign" gets activated, too
  • Send reply mail, which is encrypted+signed

Actual results:

  • When composing the reply mail after enabling offered encryption, in the upper right corner of the composer window, in the attachments menu, "My public OpenPGP key" is not checked.
  • My sent encrypted+signed reply mail has my OpenPGP key not attached.

Expected results:

The same as when replying to a received encrypted mail for which you have the senders public key:

  • When composing the reply mail (encryption+signing is automatically enabled), in the upper right corner of the composer window, in the attachments menu, "My public OpenPGP key" is checked.
  • The sent encrypted+signed reply mail has my OpenPGP key attached.

2022-07-11_1317_mass-mark-TB102found

Blocks: tb102found

Your instructions are inconsistent.

(In reply to Arvidt from comment #0)

  • In OpenPGP settings have activated "Enable encryption for new mails" + "Automatically attach my public key file when signing"

here you say encrypt by default

  • Receive an unencrypted+unsigned mail from address for which you have a valid public key
  • Reply to that mail (composer opens)
  • On the bottom there is a note "Encryption possible" and a button "Encrypt" (which is great !)

here you say that TB suggests to enable encryption.

With the above default setting, you wouldn't need to get that suggestion, because encryption was already turned on when you opened the reply.

(I'm just pointing this out as the first thing I notice in your instructions. I'll try to follow the rest of your instructions anyway.)

(In reply to Arvidt from comment #0)

Actual results:

  • When composing the reply mail after enabling offered encryption, in the upper right corner of the composer window, in the attachments menu, "My public OpenPGP key" is not checked.
  • My sent encrypted+signed reply mail has my OpenPGP key not attached.

Confirming this bug.

(If default prefs are "do not encrypt".)

Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee: nobody → kaie
Status: NEW → ASSIGNED
Summary: Signature key file is not attached when replying encrypted+signed to received unencrypted mail → Public key not automatically attached after enabling encryption (and signing) from "can encrypt" reminder

(In reply to Kai Engert (:KaiE:) from comment #2)

Your instructions are inconsistent.

(In reply to Arvidt from comment #0)

Hello Kai, the steps to reproduce are precisely correct, that is what I did, so I guess the behavior of TB is inconsistent.

Maybe it is noteworthy that with the foreign email contact I never had exchanged encrypted or signed email before, I only had the foreign public key, and then I replied to another plain text mail.
I could imagine TB only activates encryption automatically if there had been exchanged encrypted mails before?
Because auto-enabling works with another contact with whom I exchanged encrypted mails before.

(In reply to Arvidt from comment #5)

(In reply to Kai Engert (:KaiE:) from comment #2)

Your instructions are inconsistent.

(In reply to Arvidt from comment #0)

Hello Kai, the steps to reproduce are precisely correct, that is what I did, so I guess the behavior of TB is inconsistent.

I guess I haven't explained well.

You said
"In OpenPGP settings have activated "Enable encryption for new mails" + "Automatically attach my public key file when signing""

With that setting, you never get the reminder to encrypt a message, because the email will automatically have encryption enabled.

That's what I understood, right. Unfortunately I do not have the received mail anymore so I cannot reproduce it anymore, but I am pretty sure that the encryption reminder button appeared, while having activated "Enable encryption for new mails" + "Automatically attach my public key file when signing"", really. Exactly as I had written in the steps to reproduce.
I understand that this is not expected, but it happened.

Ok, thanks for clarifying. It's surprising.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/d0a513e48e8e
Adjust OpenPGP key attachment setting after enabling encryption from reminder. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch

Comment on attachment 9285385 [details]
Bug 1778939 - Adjust OpenPGP key attachment setting after enabling encryption from reminder. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #): -
User impact if declined: incomplete behavior
Testing completed (on c-c, etc.):
Risk to taking this patch (and alternatives if risky): low

Attachment #9285385 - Flags: approval-comm-beta?
Pushed by kaie@kuix.de:
https://hg.mozilla.org/comm-central/rev/259e865ef387
Follow up, fix forgotten caller of renamed function setSendEncryptedAndSigned. r=bustage DONTBUILD

Comment on attachment 9285464 [details]
Bug 1778939 - Follow up, fix forgotten caller of renamed function setSendEncryptedAndSigned. r=darktrojan

need follow-up patch, too

Attachment #9285464 - Flags: approval-comm-beta?

Comment on attachment 9285385 [details]
Bug 1778939 - Adjust OpenPGP key attachment setting after enabling encryption from reminder. r=mkmelin

[Triage Comment]
Approved for beta, with follow up patch

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

Comment on attachment 9285464 [details]
Bug 1778939 - Follow up, fix forgotten caller of renamed function setSendEncryptedAndSigned. r=darktrojan

[Triage Comment]
Approved for beta

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

Thunderbird 103.0b6:
https://hg.mozilla.org/releases/comm-beta/rev/e244ddc34a01
(combined patch includes follow-up)

(In reply to Kai Engert (:KaiE:) from comment #8)

Ok, thanks for clarifying. It's surprising.

Could reproduce it with a new received mail, filed bug 1780286

Blocks: 1771339

Comment on attachment 9285385 [details]
Bug 1778939 - Adjust OpenPGP key attachment setting after enabling encryption from reminder. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #): unclear (due to rework I think)
User impact if declined: per bug summary
Testing completed (on c-c, etc.): beta
Risk to taking this patch (and alternatives if risky): not too risky. Needs to be uplifted with bug 1771339 (which builds on this)

Attachment #9285385 - Flags: approval-comm-esr102?

Comment on attachment 9285385 [details]
Bug 1778939 - Adjust OpenPGP key attachment setting after enabling encryption from reminder. r=mkmelin

[Triage Comment]
Approved for esr102

Attachment #9285385 - Flags: approval-comm-esr102? → approval-comm-esr102+

Comment on attachment 9285464 [details]
Bug 1778939 - Follow up, fix forgotten caller of renamed function setSendEncryptedAndSigned. r=darktrojan

[Triage Comment]
Approved for esr102 (assuming both patches are needed for esr, as was done for beta)

Attachment #9285464 - Flags: approval-comm-esr102+
Blocks: 1784538
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: