Bug 185393 - Abstract logic to log console messages and send CSP violation reports into a client
Summary: Abstract logic to log console messages and send CSP violation reports into a ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on: 185366 185380
Blocks: 185410
  Show dependency treegraph
 
Reported: 2018-05-07 14:11 PDT by Daniel Bates
Modified: 2018-05-07 20:51 PDT (History)
8 users (show)

See Also:


Attachments
Patch (44.93 KB, patch)
2018-05-07 15:32 PDT, Daniel Bates
bfulgham: review+
Details | Formatted Diff | Diff
For EWS (42.27 KB, patch)
2018-05-07 18:16 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 2018-05-07 14:11:25 PDT
Towards supporting logging of console messages for CSP parse errors and CSP violations as well as the sending of CSP reports from NetworkProcess and workers we should abstract the logic to perform these operations into a client the the ContentSecurityPolicy object can delegate to.
Comment 1 Radar WebKit Bug Importer 2018-05-07 14:12:26 PDT
<rdar://problem/40036053>
Comment 2 Daniel Bates 2018-05-07 15:32:19 PDT
Created attachment 339760 [details]
Patch

This patch depends on the patches for bug 185366 and bug 185380.
Comment 3 Brent Fulgham 2018-05-07 16:25:34 PDT
Comment on attachment 339760 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=339760&action=review

r=me

> Source/WebKit/NetworkProcess/NetworkLoadChecker.h:77
> +    WebCore::ContentSecurityPolicy* contentSecurityPolicy();

Perhaps m_contentSecurityPolicy doesn't need to be mutable if this can be non-const.
Comment 4 EWS Watchlist 2018-05-07 16:42:31 PDT
Attachment 339760 [details] did not pass style-queue:


ERROR: Source/WebCore/page/csp/ContentSecurityPolicy.cpp:94:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 18 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Daniel Bates 2018-05-07 18:16:11 PDT
Created attachment 339785 [details]
For EWS
Comment 6 EWS Watchlist 2018-05-07 18:19:01 PDT
Attachment 339785 [details] did not pass style-queue:


ERROR: Source/WebCore/page/csp/ContentSecurityPolicy.cpp:94:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 18 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 Daniel Bates 2018-05-07 20:51:13 PDT
Committed r231476: <https://trac.webkit.org/changeset/231476>