fix: reveal mode broken when encryption enabled — encrypted settings blob passed to content script

When at-rest encryption is enabled, storage.onChanged fires with
encrypted blobs for ss_settings. The injector was passing this
encrypted blob directly as settings to the page world content script,
overwriting real settings with { _ssLocalEncrypted: true, data: ... }.

This broke reveal mode, highlights, and any setting toggle because
the content script's settings object became the encrypted blob.

Fix: skip encrypted settings blobs in injector.js (same check already
existed for mappings and identity). The background's settings:updated
message already sends decrypted settings correctly.

https://claude.ai/code/session_01KF4i7Ra7zCEDskxDBaNtcT
This commit is contained in:
Claude
2026-03-29 00:53:17 +00:00
parent 002a67ba95
commit d8784e8f75
5 changed files with 8 additions and 5 deletions
+4 -1
View File
@@ -127,7 +127,10 @@
const val = changes.ss_identity.newValue;
if (!val?._ssLocalEncrypted) msg.identity = mergeProfiles(val);
}
if (changes.ss_settings) msg.settings = changes.ss_settings.newValue;
if (changes.ss_settings) {
const val = changes.ss_settings.newValue;
if (!val?._ssLocalEncrypted) msg.settings = val;
}
// Only post if we have something meaningful to send
if (msg.mappings || msg.identity || msg.settings) {