Fix "Origin" isolation check #135
Labels
effort/hours
Estimated to take one or several hours
exp/intermediate
Prior experience is likely helpful
good first issue
Good issue for new contributors
help wanted
Seeking public contribution on this issue
kind/bug
A bug in existing code (including security flaws)
P1
High: Likely tackled by core team if no one steps up
status/ready
Ready to be worked
It seems that gateways get β for Origin isolation and π EVEN when path gateway does not redirect to a subdomain.
This broken setup is not possible with go-ipfs, but someone could do this type of menace with a custom Nginx config, defeating the origin isolation provided by subdomains.
Figuring out if
/ipfs/{cid}
returns HTTP 200 or 301 will be tricky because JSfetch
follows redirects.Workarounds to investigate (did not check, just an idea):
load HTML+JS into a hidden iframe, and readwindow.location.origin
from iframe via postMessage and fail if origin is nothttps://{cid}.ipfs.{gateway}
The text was updated successfully, but these errors were encountered: