Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should request's referrer uses browsing context container’s node document url in Blob url #120

Open
tungnh28 opened this issue May 14, 2019 · 0 comments

Comments

@tungnh28
Copy link

tungnh28 commented May 14, 2019

That is defined in https://www.w3.org/TR/referrer-policy/#determine-requests-referrer step 3-3
and in the case nested browsing context iframe srcdoc we should use container’s node document uri.
In fact, referrer policy is inherited from the creator browsing context or blob URL not only in srcdoc but other cases like blob URL. Would it be better if we treat referrer in blob URL the same (or others scheme like data url, or javascript: maybe)?

Example:

  <meta name="referrer" content="origin">
  <body
    </script>
        const TEST_DOC =
            `<script>
              .... SOME LOAD HERE
            </` + "script>";

        let iframe = document.createElement("iframe");
        let blob = URL.createObjectURL(new Blob([TEST_DOC], {type: 'text/html'}));
        iframe.src = blob;
        document.body.appendChild(iframe);
      }
    </script>
  </body>

Then every load in the iframe should use referrer policy of creator document (top level) and referrer is that document's uri

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant