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

connect-src tests allow two non-interopable implementations to both pass #50387

Open
lukewarlow opened this issue Jan 30, 2025 · 1 comment
Open

Comments

@lukewarlow
Copy link
Member

For context see:

CSP issue: w3c/webappsec-csp#120

Chromium Issue: https://issues.chromium.org/issues/41278387

WebKit issue: https://bugs.webkit.org/show_bug.cgi?id=286744

connect-src should no longer throw a SecurityError in the EventSource constructor for example, however, the WPTs allow it to happen (see https://github.com/web-platform-tests/wpt/blob/master/content-security-policy/connect-src/connect-src-eventsource-blocked.sub.html)

These tests should be updated to match the spec (and majority of implementations), so WebKit correctly fails them.

cc @mikewest

@lukewarlow
Copy link
Member Author

Another example of a mismatch is /content-security-policy/connect-src/connect-src-syncxmlhttprequest-blocked.sub.html which allows .send to throw or trigger an error event on the XHR object. In that case all 3 engines throw an exception so XHR.onerror shouldn't allow a test pass.

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

No branches or pull requests

1 participant