Skip to content

fix: clear sensitive state on lock and flag IDN origins#171

Open
alez04 wants to merge 4 commits into
devfrom
hardening/autolock-idn
Open

fix: clear sensitive state on lock and flag IDN origins#171
alez04 wants to merge 4 commits into
devfrom
hardening/autolock-idn

Conversation

@alez04

@alez04 alez04 commented Jun 2, 2026

Copy link
Copy Markdown
Member

Summary

  • On wallet lock, immediately zero revealedSeed, passphraseInput, and
    close the reveal-seed and passphrase-prompt drawers in manage-accounts.tsx.
    dapp-approval-drawer.tsx already tracked lock state; it now also clears
    passphrase in the same effect.
  • Added hasIdnHostname utility that detects xn-- punycode or non-ASCII
    characters in a parsed hostname. A shared IdnWarningBadge component renders
    an amber pill below the origin in the dApp approval drawer and the
    connected-sites settings page.

Test plan

  • Open the reveal-seed drawer, wait for (or trigger) auto-lock — drawer
    closes and seed is cleared before the /unlock redirect
  • Open the dApp approval popup with a signing request, trigger lock —
    passphrase field clears and drawer closes
  • Existing lock → redirect to /unlock flow still works normally
  • Load a dApp approval request from an xn-- origin — amber
    "Internationalized domain" badge appears below the origin
  • Same badge appears on the connected-sites page for any IDN origin
  • ASCII-only origins show no badge

@alez04 alez04 force-pushed the hardening/autolock-idn branch from 8b466df to 62e88de Compare June 2, 2026 14:07
@alez04 alez04 requested a review from sallymoc June 2, 2026 14:09
@alez04 alez04 changed the title security: clear sensitive state on lock and flag IDN origins fix: clear sensitive state on lock and flag IDN origins Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant