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

Unified Diff: third_party/WebKit/Source/core/dom/StyleElement.cpp

Issue 1923273002: CSP: Allow hashed inline event handlers only with 'unsafe-hashed-attributes' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/dom/StyleElement.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleElement.cpp b/third_party/WebKit/Source/core/dom/StyleElement.cpp
index b10eff3d83577e17d6bba2bd9746ae1cc8c1f1a8..247c28a978d7d40a52596a11b8f33646bcb2de35 100644
--- a/third_party/WebKit/Source/core/dom/StyleElement.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleElement.cpp
@@ -174,7 +174,7 @@ StyleElement::ProcessingResult StyleElement::createSheet(Element* e, const Strin
const ContentSecurityPolicy* csp = document.contentSecurityPolicy();
bool passesContentSecurityPolicyChecks = shouldBypassMainWorldCSP(e)
- || csp->allowStyleWithHash(text)
+ || csp->allowStyleWithHash(text, ContentSecurityPolicy::InlineType::Block)
|| csp->allowStyleWithNonce(e->fastGetAttribute(HTMLNames::nonceAttr))
|| csp->allowInlineStyle(e->document().url(), m_startPosition.m_line, text);
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptLoader.cpp ('k') | third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698