fix: encrypted data breaks Firefox — injector can't decrypt — v2.0.13
When at-rest encryption is enabled, storage.local contains encrypted
blobs. The injector reads raw storage (content script world, no
access to IndexedDB CryptoKey) and sees { _ssLocalEncrypted: true }.
It passed empty config to content.js → no mappings → no substitution.
This is why Firefox stopped working after encryption was enabled.
Chrome/Brave worked because the user hadn't set up encryption there.
Fixed: injector now detects encrypted data and asks the background
script for decrypted config via 'get:decrypted-config' message.
The background uses the Storage module (which has IndexedDB access)
to decrypt and return the data. Falls back to empty config if the
vault is actually locked.
https://claude.ai/code/session_01SWSwDfMVij53bCTNSCLMwn
This commit is contained in:
@@ -163,6 +163,17 @@ const messageHandlers = {
|
||||
await setupAutoSyncAlarm();
|
||||
},
|
||||
|
||||
async 'get:decrypted-config'(_message, _sender, sendResponse) {
|
||||
try {
|
||||
const mappings = await Storage.getMappings();
|
||||
const identity = await Storage.getIdentity();
|
||||
const settings = await Storage.getSettings();
|
||||
sendResponse({ mappings, identity, settings });
|
||||
} catch {
|
||||
sendResponse(null);
|
||||
}
|
||||
},
|
||||
|
||||
async 'org:config-changed'() {
|
||||
await setupOrgPolicyAlarm();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user