-
Notifications
You must be signed in to change notification settings - Fork 80
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
Chrome throws a SecurityError while Firefox does not #120
Comments
|
@teddink you should get an error event on |
Indeed. We originally were throwing in In other words, this sounds like a Chrome bug and not a spec bug. If you file a bug against Chrome, I'll get it fixed.
|
Here you go Mike: 651879 |
We changed the spec quite some time ago to deal with 'connect-src' violations in Fetch rather than in each API individually. This means that we should stop throwing exceptions in 'XHR::open', 'EventSource', 'WebSocket', and 'sendBeacon'. Closes w3c/webappsec-csp#120. BUG=651879,694525 R=tyoshino@chromium.org,foolip@chromium.org Review-Url: https://codereview.chromium.org/2456013002 Cr-Commit-Position: refs/heads/master@{#458384}
This was fixed in Igalia/chromium@8a4e051. |
The Edge team is currently implementing CSP2 and we are onboarding the w3c/web-platform-tests for CSP. We found a couple of instances where Chrome and Firefox disagree.
Both browsers correctly block the action and send a CSP report. However, sometimes additionally Chrome throws a SecurityError, while Firefox does not.
We haven’t been through all the tests yet, but the pattern seems to be that Chrome throws for actions that can only be instigated via
<script>
:• When creating a new EventSource to a blocked URL, Chrome throws while FireFox quietly closes the connection.
• When using ‘sendBeacon’ to send to a blocked URL, Chrome throws while FireFox quietly sends nothing.
The connect-src section of the spec seems to leave the correct behavior ambiguous. What is the expected behavior here?
The text was updated successfully, but these errors were encountered: