Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Issue 549163003: CSP: Change 'self' to ask the policy object whether a URL matches. (Closed)

Created:
6 years, 3 months ago by Mike West
Modified:
6 years, 3 months ago
CC:
blink-reviews
Project:
blink
Visibility:
Public.

Description

CSP: Change 'self' to ask the policy object whether a URL matches. Currently, when CSPSourceList encounters "'self'" in a source list, it creates a CSPSource using the currently available SecurityOrigin. If we want to be able to create CSP objects before documents are available (to support `frame-ancestors` for instance), we need to break this dependency. This patch adjusts CSPSourceList to ask the policy object whether a URL matches self, and the policy object to store a replacable CSPSource object that could be swapped out if the SecurityOrigin changes. BUG=411889 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181629

Patch Set 1 #

Total comments: 1

Patch Set 2 : httpfamily #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -8 lines) Patch
M Source/core/frame/csp/CSPSource.cpp View 1 chunk +2 lines, -6 lines 0 comments Download
M Source/core/frame/csp/CSPSourceList.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/frame/csp/CSPSourceList.cpp View 3 chunks +5 lines, -1 line 0 comments Download
M Source/core/frame/csp/ContentSecurityPolicy.h View 4 chunks +7 lines, -1 line 0 comments Download
M Source/core/frame/csp/ContentSecurityPolicy.cpp View 1 2 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Mike West
Mind taking a look at this patch, Jochen? Hopefully the description is descriptive enough. :)
6 years, 3 months ago (2014-09-08 13:42:18 UTC) #2
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/549163003/diff/1/Source/core/frame/csp/ContentSecurityPolicy.cpp File Source/core/frame/csp/ContentSecurityPolicy.cpp (right): https://codereview.chromium.org/549163003/diff/1/Source/core/frame/csp/ContentSecurityPolicy.cpp#newcode785 Source/core/frame/csp/ContentSecurityPolicy.cpp:785: return url.protocolIs("http") || url.protocolIs("https"); isn't there some protocolIsInHTTPFamily() ...
6 years, 3 months ago (2014-09-09 08:11:15 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mkwst@chromium.org/549163003/20001
6 years, 3 months ago (2014-09-09 08:59:20 UTC) #5
Mike West
Yup, changed to use that method, thanks!
6 years, 3 months ago (2014-09-09 08:59:30 UTC) #6
commit-bot: I haz the power
6 years, 3 months ago (2014-09-09 10:03:01 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as 181629

Powered by Google App Engine
This is Rietveld 408576698