fix(ui): tell Bitwarden to skip config and secret fields

The Input and Textarea primitives already opted config and secret fields
out of 1Password and LastPass autofill (data-1p-ignore / data-lpignore)
whenever autocomplete was off, but Bitwarden had no opt-out hint anywhere,
so it kept offering to fill and save API keys, tokens and integration
URLs. Emit data-bwignore alongside the existing hints, which covers every
field flowing through the primitives. Pin explicit autocomplete on the
change-password dialog so genuine credentials still autofill, and add the
ignore hints to the export passphrase and the few new-password admin
config fields that opt in directly.
This commit is contained in:
Marc-André Bombeck committed 2026-06-30 18:32:35 +02:00
1 parent 8ce98a802f
commit fa2e2c6ba2
9 files changed
+31 -3

No files matched your search

+4 -1
View File
@@ -34,7 +34,9 @@ import { cn } from "@/lib/utils";
* `<Input>`: HealthLog is a health-data app, and we don't want
* a password manager pasting the user's saved password into a
* free-text textarea that we then persist server-side. Caller
* can opt back in (e.g. `"on"`) per field.
* can opt back in (e.g. `"on"`) per field. When autofill is
* skipped, the LastPass / 1Password / Bitwarden ignore hints are
* emitted so none of the three offer to fill or save the field.
*
* Composition is via `cn(…)` so callers can override anything — the
* primitive defaults are the strict pass, not the only pass.
@@ -59,6 +61,7 @@ function Textarea({
spellCheck={resolvedSpellCheck}
data-lpignore={skipAutofill ? "true" : undefined}
data-1p-ignore={skipAutofill ? "true" : undefined}
data-bwignore={skipAutofill ? "true" : undefined}
className={cn(
// iOS zoom defence + WCAG 2.5.5 tap-target floor; see the
// primitive's docblock for the full reasoning.