|
CSP: Fix 'strict-dynamic' with multiple policies.
The checks we wrote for 'strict-dynamic' fail to allow dynamically-
injected scripts if more than one policy is present. This patch
addresses that by delegating the dynamic check to 'ContentSecurityPolicy'
(rather than bypassing CSP entirely from 'ScriptLoader'). Most of the
patch is just piping the "Was this parser-inserted?" bit from
'ScriptLoader::fetchScript' to 'CSPDirectiveList::allowScriptFromSource'.
to another.
BUG= 653511
Committed: https://crrev.com/cbb622f22b8e8c42e509fa7e1229382ceb0b0b14
Cr-Commit-Position: refs/heads/master@{#423557}
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+232 lines, -348 lines) |
Patch |
 |
D |
third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-strict-dynamic.html
|
View
|
|
1 chunk |
+0 lines, -170 lines |
0 comments
|
Download
|
 |
D |
third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-whitelist.html
|
View
|
|
1 chunk |
+0 lines, -52 lines |
0 comments
|
Download
|
 |
A + |
third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/strict-dynamic/script-src-multiple-allowed.php
|
View
|
|
7 chunks |
+9 lines, -7 lines |
0 comments
|
Download
|
 |
A + |
third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/strict-dynamic/script-src-strict-dynamic.html
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
A + |
third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/strict-dynamic/script-src-strict-dynamic-whitelist.html
|
View
|
|
0 chunks |
+-1 lines, --1 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/dom/ScriptLoader.cpp
|
View
|
1
|
3 chunks |
+11 lines, -16 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/fetch/FetchRequest.h
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/fetch/ResourceLoaderOptions.h
|
View
|
|
7 chunks |
+13 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h
|
View
|
1
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.cpp
|
View
|
1
|
2 chunks |
+6 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp
|
View
|
1
|
6 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
|
View
|
1
|
4 chunks |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
|
View
|
1
|
8 chunks |
+65 lines, -17 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
|
View
|
1
|
19 chunks |
+109 lines, -74 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/html/parser/PreloadRequest.cpp
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/HttpEquiv.cpp
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/workers/WorkerGlobalScope.cpp
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
Total messages: 19 (10 generated)
|