Prompt for the primary password when the store's key needs it
Categories
(Toolkit :: Form Autofill, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: dimi, Assigned: dimi)
References
Details
Attachments
(1 external file)
| Assignee | ||
Comment 1•1 month ago
|
||
The store's key lives in NSS, so with a primary password set it cannot be read
until the user unlocks the token. The authenticator follows passwordmgr's
RustLoginStorageAuthenticator, since both stores share key4.db: it notifies the
same topics and declines while LoginHelper.requestReauth holds the token logged
out.
The store decrypts every card it reads and fails the whole read on a number it
cannot decrypt, so with the token locked even listing the cards needs the key.
Reads the user asked for -- the dropdown, the preferences list, filling, saving
and editing -- run inside RustAutofillStore.allowingPrompt() and prompt; the
saved-field-name scan and the migration never do. A locked token is reported as
NS_ERROR_ABORT, as crypto-SDR and the JSON store do. A declined prompt shows no
cards in the dropdown, which then holds off prompting as passwordmgr's
autocomplete does, and no save doorhanger for a submitted card.
A read that fails with the token unlocked is a number another key wrote. The
store's CryptoError is passed on and the stored numbers are left as they are,
as passwordmgr leaves logins it cannot decrypt.
CreditCardStorageMigrator unlocks the key before copying, as
LoginStorageMigrator does, so a declined prompt defers the migration instead of
using up one of its attempts.
Updated•29 days ago
|
Description
•