Where.src/background/index.js:1428-1446 takes sender.origin as the site whenever it is a non-empty string.
What happens. A document with an opaque origin, such as a page its server sends with a sandbox Content-Security-Policy, is reported with the origin "null". The wallet accepts "null" as a site. Two things follow:
Every such document, from every website, is the same site. A connection remembered for "null" connects all of them with no prompt, and each of them can read the active address and raise signing prompts.
isPhishingDomain(extractHostname("null")) never matches, so a blocklisted domain that serves its pages this way gets no phishing banner on any approval screen.
Should. README SiteApproval: "A site is its full origin, scheme://host[:port]". A request whose origin is not one is refused like a request with no origin, with 4100.
Severity: minor
Definition of done
A request whose reported origin is "null", or anything else that is not scheme://host[:port], is refused with 4100 and opens no prompt.
A test in tests/rpcOrigin.test.js sends a request with sender.origin set to "null".
The review on #383 set opaque origins aside because content scripts do not run in sandboxed subframes. This is a different path: a top-level page sandboxed by its own header, which the manifests' content scripts match by its URL, as they match every page. Not run in a browser; read from the code and from the browser's documentation that sender.origin can be opaque.
Model: opus-5-5
**Where.** `src/background/index.js:1428-1446` takes `sender.origin` as the site whenever it is a non-empty string.
**What happens.** A document with an opaque origin, such as a page its server sends with a `sandbox` Content-Security-Policy, is reported with the origin `"null"`. The wallet accepts `"null"` as a site. Two things follow:
- Every such document, from every website, is the same site. A connection remembered for `"null"` connects all of them with no prompt, and each of them can read the active address and raise signing prompts.
- `isPhishingDomain(extractHostname("null"))` never matches, so a blocklisted domain that serves its pages this way gets no phishing banner on any approval screen.
**Should.** README SiteApproval: "A site is its full origin, `scheme://host[:port]`". A request whose origin is not one is refused like a request with no origin, with 4100.
Severity: minor
## Definition of done
- [ ] A request whose reported origin is `"null"`, or anything else that is not `scheme://host[:port]`, is refused with 4100 and opens no prompt.
- [ ] A test in `tests/rpcOrigin.test.js` sends a request with `sender.origin` set to `"null"`.
The review on https://git.eeqj.de/sneak/AutistMask/issues/383 set opaque origins aside because content scripts do not run in sandboxed subframes. This is a different path: a top-level page sandboxed by its own header, which the manifests' content scripts match by its URL, as they match every page. Not run in a browser; read from the code and from the browser's documentation that `sender.origin` can be opaque.
Model: opus-5-5
clawbot
self-assigned this 2026-10-14 04:49:39 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Where.
src/background/index.js:1428-1446takessender.originas the site whenever it is a non-empty string.What happens. A document with an opaque origin, such as a page its server sends with a
sandboxContent-Security-Policy, is reported with the origin"null". The wallet accepts"null"as a site. Two things follow:"null"connects all of them with no prompt, and each of them can read the active address and raise signing prompts.isPhishingDomain(extractHostname("null"))never matches, so a blocklisted domain that serves its pages this way gets no phishing banner on any approval screen.Should. README SiteApproval: "A site is its full origin,
scheme://host[:port]". A request whose origin is not one is refused like a request with no origin, with 4100.Severity: minor
Definition of done
"null", or anything else that is notscheme://host[:port], is refused with 4100 and opens no prompt.tests/rpcOrigin.test.jssends a request withsender.originset to"null".The review on #383 set opaque origins aside because content scripts do not run in sandboxed subframes. This is a different path: a top-level page sandboxed by its own header, which the manifests' content scripts match by its URL, as they match every page. Not run in a browser; read from the code and from the browser's documentation that
sender.origincan be opaque.Model: opus-5-5