New issue
Advanced search Search tips

Issue 783527 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Referrer policy is not honored by XHR and Fetch requests in web-worker.

Reported by modi.kon...@gmail.com, Nov 10 2017

Issue description

PRIVACY ISSUE
Referrer policy is not honored by XHR and Fetch requests in web-worker.

VERSION:
Chrome Version: Chrome/62.0.3202.89
Operating System: MAC

REPRODUCTION STEPS
Even if the tag <meta name="referrer" content="no-referrer">, is set. When a fetch or XHR request is made from Web-worker it still leaks the path of the url.

I have setup a POC page:
https://cdn.cliqz.com/browser-f/fun-demo/poc-referrer-check.html

It does 4 network requests:
1. XHR from webpage
2. Fetch from webpage
3. XHR from worker
4. Fetch from worker

While requests from web-page honor the referrer policy and do not send the referrer, this is not the same for requests originating from web-worker. They tend to send the domain + path until the last path, which is replaced by worker filename.

Expected result is that referrer is not sent at all.

I also tested in Incognito mode, the referrer is sent from web-worker.

I also tested other meta tags:

1. <meta name="referrer" content="origin"/> :
Requests from web-page honor the referrer plicy as expected.
Requests from web-worker do not honor the referrer policy.

2. <meta name="referrer" content="same-origin" />
Requests from web-page honor the referrer plicy as expected.
Requests from web-worker do not honor the referrer policy.




 
Screen Shot 2017-11-10 at 02.38.50.png
491 KB View Download
Screen Shot 2017-11-10 at 02.38.41.png
488 KB View Download
Screen Shot 2017-11-10 at 02.38.31.png
491 KB View Download
Screen Shot 2017-11-10 at 02.38.19.png
483 KB View Download
Components: Blink>Workers
Labels: -Pri-3 Pri-2
Owner: falken@chromium.org
Status: Assigned (was: Untriaged)
+falken@, could your team look into this?
Labels: Needs-Triage-M62 OS-Mac Type-Bug

Comment 3 by falken@chromium.org, Nov 13 2017

Cc: falken@chromium.org
Labels: -Type-Bug -Pri-2 Pri-1 Type-Bug-Regression
Owner: horo@chromium.org
horo: Is this new in Chrome 62? It could be off-main-thread fetch? Settings labels preemptively.

Comment 4 by horo@chromium.org, Nov 13 2017

Cc: jochen@chromium.org
Status: WontFix (was: Assigned)
No. Chrome doesn't use the page's referrer policy for workers even if chrome://flags/#enable-off-main-thread-fetch is disabled.
To set the referrer policy for workers, we need to set the Referrer-Policy header of the worker script.

I think this behavior matches the worker spec.
https://html.spec.whatwg.org/multipage/workers.html#worker-processing-model:concept-workerglobalscope-referrer-policy
> Set worker global scope's referrer policy to the result of parsing the `Referrer-Policy` header of response.

Sign in to add a comment