From fefa1dc2c53caf3c02239824fc7cb632c57cfd60 Mon Sep 17 00:00:00 2001 From: Francois Marier Date: Mon, 8 Nov 2021 19:19:45 -0800 Subject: [PATCH] Send "null" Origin header on cross-origin .onion requests Fixes #1350. --- fetch.bs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fetch.bs b/fetch.bs index 8f34ae887..7cbadab09 100644 --- a/fetch.bs +++ b/fetch.bs @@ -111,6 +111,9 @@ urlPrefix:https://w3c.github.io/hr-time/#;spec:hr-time "href": "https://datatracker.ietf.org/doc/html/draft-ietf-masque-h3-datagram", "publisher": "IETF", "title": "Using QUIC Datagrams with HTTP/3" + }, + "ONION": { + "aliasOf": "RFC7686" } } @@ -2820,6 +2823,11 @@ given a request request, run these steps:
  • Let serializedOrigin be the result of byte-serializing a request origin with request. +

  • If request's current URL's origin's + host ends with .onion or .onion. [[ONION]], and + is not same origin with request's origin, then set + serializedOrigin to `null`. +

  • If request's response tainting is "cors" or request's mode is "websocket", then append (`Origin`, serializedOrigin) to