mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-06 03:18:23 +00:00
The auth whitelist auto-accepted kind-22242 (NIP-42) signing for any caller: whitelistAutoAccept bypassed the per-requester permission check in the SignerProvider/NIP-46 query path, letting any installed app or bunker client silently obtain relay-auth signatures for whitelisted relays (confused deputy, CWE-863). The whitelist is now only a relay constraint: non-whitelisted relays still auto-reject, but membership no longer grants signing. Kind-22242 requests always require a requester-scoped SIGN_EVENT permission (relay-specific or wildcard grant) or fall through to the user prompt, matching the whitelist's documented behavior and the approval UIs. Adds SignerProviderQueryTest covering: no silent signing without a grant, silent signing with relay-scoped/wildcard grants, auto-reject of non-whitelisted relays before any permission lookup, and unchanged empty-whitelist behavior.