Bug 155817 - CSP: Simplify logic for checking policies
Summary: CSP: Simplify logic for checking policies
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
Keywords: InRadar
Depends on:
Reported: 2016-03-23 16:00 PDT by Daniel Bates
Modified: 2016-03-23 19:41 PDT (History)
5 users (show)

See Also:

Patch (24.96 KB, patch)
2016-03-23 16:05 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2016-03-23 16:00:18 PDT
Currently we have various static template functions in ContentSecurityPolicy.cpp to check if a resource request for a particular directive violates any of the CSPs that were delivered with the document. These functions are identical up to the function F they invoke and the arguments they take and pass to F. We should look to consolidate these function into a single function that has a similar prototype as std::invoke() to remove duplication and centralize the semantics for determining a directive violation against some CSP policy.
Comment 1 Radar WebKit Bug Importer 2016-03-23 16:01:39 PDT
Comment 2 Daniel Bates 2016-03-23 16:05:33 PDT
Created attachment 274789 [details]
Comment 3 Daniel Bates 2016-03-23 19:41:27 PDT
Comment on attachment 274789 [details]

Clearing flags on attachment: 274789

Committed r198613: <http://trac.webkit.org/changeset/198613>
Comment 4 Daniel Bates 2016-03-23 19:41:30 PDT
All reviewed patches have been landed.  Closing bug.