-
Notifications
You must be signed in to change notification settings - Fork 79
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
Note somewhere that redirects are covered by fetch directives. #72
Comments
The text in https://w3c.github.io/webappsec-csp/#fetch-integration now seems pretty clear. @ptoomey3: Would you appreciate any more adjustment? |
It is quite possible that folks more intimately familiar with the fetch spec would find the current behavior/description within the CSP spec obvious. But, as a standalone section, I still find it a bit unclear how redirects would/should interact with CSP.
So, step 5 says to:
This defers the question back to the CSP spec with the following:
So, if this logic is "executed against each request before it hits the network, and against each redirect that a request might go through" then one needs to understand what represents "a request’s client’s global object’s CSP list". Inside section 4.1 this is discussed a bit:
This description then has a note below it:
All together, it reads to me like one might expect that, given a redirect in a "response", the browser would parse the CSP in that response before acting on the response (in a similar way to how "before we handle the Set-Cookie header"). Again, maybe I'm reading it this way because I don't have intimate familiarity with the fetch spec. And, those that do (i.e. browser makers/people that need to implement CSP) would read all of the above and not reach the same conclusions/expectations. But, I think if CSPs perspective is that all CSP headers found in redirect responses are ignored, it might be stated more simply as:
Setting aside whether the current spec's description is clear or not, the bit about As an aside, the issue with 302 redirects and |
@ptoomey3 would like some more clarity in the spec around the redirect behavior of the various directives that affect redirects: https://twitter.com/patricktoomey/status/721036954146476032 So let's be explicit about that somewhere.
The text was updated successfully, but these errors were encountered: