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

Unified Diff: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp

Issue 2447003002: CSP: 'violated-directive' should match 'effective-directive'. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
index 2bef27e76e580e7c90839ac791d3a713817daad5..600a24c2d1803004ba136912700a1be0570787e3 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -1118,7 +1118,7 @@ static void gatherSecurityPolicyViolationEventData(
}
}
init.setReferrer(document->referrer());
- init.setViolatedDirective(directiveText);
+ init.setViolatedDirective(effectiveDirective);
init.setEffectiveDirective(effectiveDirective);
init.setOriginalPolicy(header);
init.setDisposition(headerType == ContentSecurityPolicyHeaderTypeEnforce

Powered by Google App Engine
This is Rietveld 408576698