GithubHelp home page GithubHelp logo

Comments (7)

annevk avatar annevk commented on June 3, 2024

"API referrer source" is now basically the environment settings object itself rather than a field on it, passed to fetch as request's client. (Or you can set an explicit referrer through request's referrer.)

from webappsec-referrer-policy.

domenic avatar domenic commented on June 3, 2024

@annevk with that in mind do you have a suggestion for how to fix https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer step 3.3.2? It doesn't seem obvious to me.

from webappsec-referrer-policy.

annevk avatar annevk commented on June 3, 2024

I think for a worker you'd just inspect the worker itself for the referrer policy. That would be analogous to CSP. What it states now seems wrong, but I might be missing something?

from webappsec-referrer-policy.

domenic avatar domenic commented on June 3, 2024

I was hoping for some explicit text, or a pull request on top of my #42 :)

from webappsec-referrer-policy.

estark37 avatar estark37 commented on June 3, 2024

@domenic did you happen to already have a plan for fixing the "API referrer source" reference in https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer? I wonder if it should be the creation URL of the environment settings object...

from webappsec-referrer-policy.

domenic avatar domenic commented on June 3, 2024

I don't have a plan; I was hoping @annevk would give more concrete suggestions. But maybe this isn't so bad after all...

I wonder if it should be the creation URL of the environment settings object...

I believe that is correct, for the worker case. For the document case, the current text seems correct, although I'm not sure on the difference between the responsible browsing context's active document, and the responsible document.

The algorithm looks like it could be cleaned up a decent bit. Here is my draft to replace the current step 3:

  1. If request's referrer is a URL, then let referrerSource be request's referrer.
  2. Otherwise,
    1. If environment's global object is a Window object, then
      1. Let document be the active document of environment's responsible browsing context.
      2. If document's origin is an opaque origin, return "no-referrer" and abort this algorithm.
      3. While document is an iframe srcdoc document, let document be document's browsing context's browsing context container's Document.
      4. Let referrerSource be document's URL.
    2. Otherwise, let referrerSource be environment's creation URL.

from webappsec-referrer-policy.

domenic avatar domenic commented on June 3, 2024

In a series of wonderful pull requests (whatwg/html#1641 whatwg/html#1649 whatwg/html#1651) @estark37 finished this off!

from webappsec-referrer-policy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.