fix: a request whose origin has no host is refused, not treated as a site (closes #527) #560

Merged
clawbot merged 1 commits from issue-527-opaque-origin into next 2026-10-16 04:44:50 +02:00
1 Commits
Author SHA1 Message Date
sneak 7748e49aa8 fix: a request whose origin has no host is refused, not treated as a site (closes #527)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
A page with an opaque origin, such as one its server sandboxes with a
Content-Security-Policy, is reported to the background with the origin
"null", and Chrome reports a local file as "file://". The background took
either as a site, so every such page was one site: a connection remembered
for one covered them all, and the phishing check never matched. The
background now parses the reported origin and, when it has no host, refuses
the request with 4100 like one with no origin, before any method runs.
tests/rpcOrigin.test.js sends both, and README's SiteApproval says what is
refused.

Model: opus-5-5
2026-10-16 02:04:16 +00:00