Closed Bug 2069581 Opened 1 month ago Closed 1 month ago

"Generate OpenPGP Key" window UI is confusing/broken if identity fullName is not set

Categories

(MailNews Core :: Security: OpenPGP, defect)

Thunderbird 155
defect

Tracking

(thunderbird_esr153 wontfix, thunderbird157 affected)

RESOLVED FIXED
158 Branch
Tracking Status
thunderbird_esr153 --- wontfix
thunderbird157 --- affected

People

(Reporter: regspam, Assigned: mkmelin)

Details

Attachments

(1 file, 1 external file, 1 obsolete file)

Attached image genkey_layout.png —

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:155.0) Gecko/20100101 Firefox/155.0

Steps to reproduce:

Click on either:

  1. "Tools -> Account settings -> End-To-End Encryption -> OpenPGP Key Manager -> Generate -> New Key Pair",
    or
  2. "Tools -> Account settings -> End-To-End Encryption -> Add Key... -> Create a new OpenPGP Key -> Continue".

Notice that part of the UI of the window that shows up is confusing because of messed-up layout (outlined in red in the attached image, genkey_layout.png).

That's only if you enable mail.openpgp.passphrases.enabled. The UI for that is indeed in an appalling state.

Status: UNCONFIRMED → NEW
Component: Untriaged → Security: OpenPGP
Ever confirmed: true
Product: Thunderbird → MailNews Core
Summary: "Generate OpenPGP Key" window UI is confusing → "Generate OpenPGP Key" window UI is confusing/broken if enabling mail.openpgp.passphrases.enabled

That's only if you enable mail.openpgp.passphrases.enabled.

I observed the issue with that preference disabled (it's default state)...

Try Help | Troubleshoot mode. Perhaps you had some userChrome/userContent.css rule that shows it. That part of the UI doesn't normally show up without the pref set.

Just tried the Troubleshoot mode, still observe the issue with mail.openpgp.passphrases.enabled disabled.
The chrome folder in my profile is empty.

Thanks, with one of my profiles I see a totally blank dialog, but not with another.

Summary: "Generate OpenPGP Key" window UI is confusing/broken if enabling mail.openpgp.passphrases.enabled → "Generate OpenPGP Key" window UI is confusing/broken

Ugh, now I can't reproduce again.

Or I can, once I run 155. The problem I see seems to happen ONLY if account settings were left open. Opening them fresh does not reproduce.

For some reason, this seems to trigger more on 155. I found one other thing I needed to reproduce: have a message in the outbox (so I get asked to send at startup). That leads to this bad state...

Assignee: nobody → mkmelin+mozilla

Found the original problem in this bug, it happens if the identity doesn't have a fullName set up.

Summary: "Generate OpenPGP Key" window UI is confusing/broken → "Generate OpenPGP Key" window UI is confusing/broken if identity fullName is not set

Thank you, the "Tools -> Account Settings -> (account_name) -> Your Name" field was indeed empty and after filling it I don't observe the issue anymore.

The wizard used transitionend as its state machine's sequencing primitive:

  • wizardContinue() added .hide to #wizardStart and only called switchSection() from transitionend.
  • goBack() added .hide-reverse and only called backToStart() from transitionend.
  • revealSection() removed .hide/.hide-reverse from a setTimeout, and resized from transitionend.

If a transition doesn't start or its end event isn't delivered, the machine stops mid-step and every
section is left either hidden or at opacity: 0 - a blank dialog.

The fix:

  • revealSection(id) is now the single source of truth: it hides every other .wizard-section and shows the target, synchronously, then resizes.
  • wizardContinue() and goBack() act directly instead of waiting for a transition; backToStart() folded into goBack().
  • Overlays hide via hideOverlay(overlay) instead of transitionend + event.target (which could hide a descendant, since transitionend bubbles).
  • Dropped the .hide/.hide-reverse/in-subdialog classes and the block-size: 1px hack. The slide is replaced by a pure-CSS fade-in that nothing waits on.
  • gSubDialog?._topDialog / _closeButton?.remove() so poking SubDialog internals can't abort the rest of that timer callback.
  • Added a switch_sections task to browser_keyWizard.js covering forward + go-back.

Fix logic error: when the identity had no full name, wizardCreateKey() returned early,
which left the "Secret Key Protection" radio with no label at all and showing the
"expires in more than 100 years" string as the warning.

(Perhaps not regression after all)

Status: NEW → ASSIGNED
Attachment #9637464 - Attachment description: Bug 2069581 - Fix openpgp key wiz getting stuck at blank. r=#thunderbird-front-end-reviewers → Bug 2069581 - Fix openpgp key wiz getting stuck at blank. r=arschmitz
Target Milestone: --- → 158 Branch

Pushed by sking@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/b3b1fd52205e
Fix openpgp key wiz getting stuck at blank. r=arschmitz

Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 1 month ago → 1 month ago
Resolution: --- → FIXED
Attachment #9637465 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: