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

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

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/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 4850102855b93d91b2394a4dc4aa5a2984da9314..9dd3117e4f954aa284703d42edf3236ddb661db4 100644
--- a/third_party/WebKit/Source/core/frame/csp/CSPSourceList.h
+++ b/third_party/WebKit/Source/core/frame/csp/CSPSourceList.h
@@ -33,6 +33,7 @@ public:
bool allowDynamic() const;
bool allowNonce(const String&) const;
bool allowHash(const CSPHashValue&) const;
+ bool allowHashedAttributes() const;
uint8_t hashAlgorithmsUsed() const;
bool isHashOrNoncePresent() const;
@@ -51,6 +52,7 @@ private:
void addSourceUnsafeInline();
void addSourceUnsafeEval();
void addSourceUnsafeDynamic();
+ void addSourceUnsafeHashedAttributes();
void addSourceNonce(const String& nonce);
void addSourceHash(const ContentSecurityPolicyHashAlgorithm&, const DigestValue& hash);
@@ -64,6 +66,7 @@ private:
bool m_allowInline;
bool m_allowEval;
bool m_allowDynamic;
+ bool m_allowHashedAttributes;
HashSet<String> m_nonces;
HashSet<CSPHashValue> m_hashes;
uint8_t m_hashAlgorithmsUsed;

Powered by Google App Engine
This is Rietveld 408576698