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

Unified Diff: third_party/WebKit/Source/core/frame/csp/CSPSourceList.h

Issue 1641533006: CSP: Add an experimental 'unsafe-dynamic' source expression. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Experiment. Created 4 years, 11 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/CSPSourceList.h
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPSourceList.h b/third_party/WebKit/Source/core/frame/csp/CSPSourceList.h
index 76b89b921b4f519d10e1a2d7b7725c29fbc53557..8e32ec69d878c4efea5e8240c13b3c27b5965928 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPSourceList.h
+++ b/third_party/WebKit/Source/core/frame/csp/CSPSourceList.h
@@ -29,6 +29,7 @@ public:
bool matches(const KURL&, ContentSecurityPolicy::RedirectStatus = ContentSecurityPolicy::DidNotRedirect) const;
bool allowInline() const;
bool allowEval() const;
+ bool allowDynamic() const;
bool allowNonce(const String&) const;
bool allowHash(const CSPHashValue&) const;
uint8_t hashAlgorithmsUsed() const;
@@ -48,6 +49,7 @@ private:
void addSourceStar();
void addSourceUnsafeInline();
void addSourceUnsafeEval();
+ void addSourceUnsafeDynamic();
void addSourceNonce(const String& nonce);
void addSourceHash(const ContentSecurityPolicyHashAlgorithm&, const DigestValue& hash);
@@ -61,6 +63,7 @@ private:
bool m_allowStar;
bool m_allowInline;
bool m_allowEval;
+ bool m_allowDynamic;
HashSet<String> m_nonces;
HashSet<CSPHashValue> m_hashes;
uint8_t m_hashAlgorithmsUsed;

Powered by Google App Engine
This is Rietveld 408576698