Commit 7002f30
committed
fix(consent): default auto-sign OFF so first-run installs never silently trust
getAutoSign() defaulted to `true`, which made the silent NIP-98 path in
createNip98AuthHeader (background.js: `!trusted && isSolid && autoSign`)
active out of the box: a freshly installed extension visiting any of the
hardcoded Solid hosts (solid.social, solidcommunity.net, inrupt.net,
solidweb.org) would mint a NIP-98 Authorization header AND persist the
origin to trusted-origins with zero user interaction -- a silent
auto-approve / auto-trust on install.
Flip the default to OFF in storage.getAutoSign so the trusted-origin
Solid (kind 27235) auto-sign and the Solid NIP-98 auto-trust are strictly
opt-in: the user enables "Auto-sign for Solid" from the popup
deliberately. Untrusted-origin signing was already prompt-gated and is
unaffected.
Align the popup default-display accordingly: popup.js reads the same OFF
default, and the popup.html toggle drops its hardcoded `checked` so the
markup matches the real (off) state instead of flashing on at load.
No test pins the autoSign default (storage.test only asserts it is a
boolean; the consent/NIP-98 suites set it explicitly), so the full
133-test suite, build and lint remain green.
Co-Authored-By: jjohare <github@thedreamlab.uk>1 parent 7192a72 commit 7002f30
3 files changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
163 | 167 | | |
164 | 168 | | |
165 | 169 | | |
166 | | - | |
| 170 | + | |
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
| |||
0 commit comments