|
Enabled SRI only for same origin and CORS content.
According to the spec draft, Subresource Integrity should only work on
same origin or CORS enabled content. This is to avoid security issues
where SRI could be used to check the content of otherwise secret
cross-origin resources.
This CL modifies the script and style SRI checks to only be done on CORS
and same origin content. If an integrity attribute is present and
neither of those conditions hold, it adds a console warning. This
requires modifications to fetch and script loader to pass forward the
information that CORS has failed or the content is not same origin.
BUG= 438663
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=191682
Total comments: 12
Total comments: 10
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+426 lines, -35 lines) |
Patch |
 |
M |
LayoutTests/http/tests/security/resources/cors-script.php
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/resources/cors-style.php
|
View
|
1
2
3
|
1 chunk |
+10 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors.html
|
View
|
1
2
3
4
|
1 chunk |
+21 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-bad-integrity.html
|
View
|
1
2
3
4
|
1 chunk |
+21 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-bad-integrity-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-no-xorigin.html
|
View
|
1
2
3
4
|
1 chunk |
+21 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-cors-no-xorigin-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-no-cors.html
|
View
|
1
2
3
4
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-no-cors-bad-integrity.html
|
View
|
1
2
3
4
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
 |
A + |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-no-cors-bad-integrity-expected.txt
|
View
|
1
2
3
4
5
6
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
A + |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-no-cors-expected.txt
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-no-cors-no-xorigin.html
|
View
|
1
2
3
4
|
1 chunk |
+21 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-no-cors-no-xorigin-expected.txt
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-no-cors-no-xorigin-with-creds.html
|
View
|
1
2
3
4
|
1 chunk |
+22 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-script-no-cors-no-xorigin-with-creds-expected.txt
|
View
|
1
2
3
4
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-cors.html
|
View
|
1
2
3
4
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-cors-bad-integrity.html
|
View
|
1
2
3
4
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-cors-no-xorigin.html
|
View
|
1
2
3
4
|
1 chunk |
+22 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-no-cors.html
|
View
|
1
2
3
4
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-no-cors-bad-integrity.html
|
View
|
1
2
3
4
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-no-cors-no-xorigin.html
|
View
|
1
2
3
4
|
1 chunk |
+22 lines, -0 lines |
0 comments
|
Download
|
 |
A |
LayoutTests/http/tests/security/subresourceIntegrity/subresource-integrity-style-no-cors-no-xorigin-with-creds.html
|
View
|
1
2
3
4
|
1 chunk |
+22 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/ScriptLoader.cpp
|
View
|
1
2
|
2 chunks |
+7 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/fetch/Resource.h
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/fetch/Resource.cpp
|
View
|
1
2
3
4
5
|
1 chunk |
+8 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/fetch/ResourceFetcher.h
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/fetch/ResourceFetcher.cpp
|
View
|
1
2
3
4
5
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/fetch/ResourceLoader.cpp
|
View
|
1
2
3
4
5
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/fetch/ResourceLoaderHost.h
|
View
|
1
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/frame/SubresourceIntegrity.h
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/frame/SubresourceIntegrity.cpp
|
View
|
1
|
3 chunks |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/frame/SubresourceIntegrityTest.cpp
|
View
|
1
2
3
|
3 chunks |
+46 lines, -15 lines |
0 comments
|
Download
|
 |
M |
Source/core/html/HTMLLinkElement.cpp
|
View
|
1
2
3
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 21 (6 generated)
|