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

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

Issue 1835463002: Stop supporting invalid CSP directives in meta tags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove service worker extendable event test Created 4 years, 8 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 d4f207be1c0ad75875ed4cc1f8081152a12f4e7e..a1a4584ad3727f9fa9d0776946bc92e63c04d55a 100644
--- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -901,6 +901,11 @@ void ContentSecurityPolicy::reportInvalidInReportOnly(const String& name)
logToConsole("The Content Security Policy directive '" + name + "' is ignored when delivered in a report-only policy.");
}
+void ContentSecurityPolicy::reportInvalidDirectiveInMeta(const String& directive)
+{
+ logToConsole("Content Security Policies delivered via a <meta> element may not contain the " + directive + " directive.");
+}
+
void ContentSecurityPolicy::reportUnsupportedDirective(const String& name)
{
DEFINE_STATIC_LOCAL(String, allow, ("allow"));

Powered by Google App Engine
This is Rietveld 408576698