forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trusted Types violation sample clips incorrectly
https://bugs.webkit.org/show_bug.cgi?id=275392 Reviewed by NOBODY (OOPS!). This patch accurately follows the spec for sample clipping in trusted types. Spec: w3c/webappsec-csp#659 * LayoutTests/imported/w3c/web-platform-tests/content-security-policy/reporting/report-clips-sample.https-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/content-security-policy/reporting/report-clips-sample.https.html: * Source/WebCore/page/csp/ContentSecurityPolicy.cpp: (WebCore::ContentSecurityPolicy::didReceiveHeader): (WebCore::ContentSecurityPolicy::allowMissingTrustedTypesForSinkGroup const): (WebCore::ContentSecurityPolicy::reportViolation const): (WebCore::ContentSecurityPolicy::setUpgradeInsecureRequests): * Source/WebCore/page/csp/ContentSecurityPolicy.h:
- Loading branch information
1 parent
8913b13
commit 554c67d
Showing
4 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
6 changes: 2 additions & 4 deletions
6
...b-platform-tests/content-security-policy/reporting/report-clips-sample.https-expected.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
|
||
FAIL Unsafe eval violation sample is clipped to 40 characters. assert_throws_js: function "_ => { | ||
eval("evil = '1234567890123456789012345678901234567890';"); | ||
}" did not throw | ||
PASS Unsafe eval violation sample is clipped to 40 characters. | ||
FAIL Function constructor - the other kind of eval - is clipped. assert_throws_js: function "_ => { | ||
new Function("a", "b", "return '1234567890123456789012345678901234567890';"); | ||
}" did not throw | ||
FAIL Trusted Types violation sample is clipped to 40 characters excluded the sink name. assert_equals: expected "Element innerHTML|1234567890123456789012345678901234567890" but got "Element innerHTML|1234567890123456789012" | ||
PASS Trusted Types violation sample is clipped to 40 characters excluded the sink name. | ||
|
2 changes: 1 addition & 1 deletion
2
...d/w3c/web-platform-tests/content-security-policy/reporting/report-clips-sample.https.html
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
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