-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow upgrades from explicitly insecure expressions
CSP2 allows developers to shoot themselves in the foot by locking themselves into insecure requests via source expressions like `'self'`, `http:` or `http://example.com`. This patch loosens the matching rules for these insecure schemes to include their secure variants. That is, `http:` is not equivalent to `http: https:`, and `ws:` to `ws: wss:`. Likewise, handling for `'self'` now includes `https:` and `wss:` on the protected resource's host. Fixes w3c/webappsec#25. Fixes w3c/webappsec#7.
- Loading branch information
Showing
2 changed files
with
96 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters