Index: Source/core/frame/csp/CSPDirectiveList.cpp |
diff --git a/Source/core/frame/csp/CSPDirectiveList.cpp b/Source/core/frame/csp/CSPDirectiveList.cpp |
index d88ffc3725a9747107df8c71f57d77f543c839fa..b99bb2809e1da107ab7d3bd4b9f86c5b03cddaf8 100644 |
--- a/Source/core/frame/csp/CSPDirectiveList.cpp |
+++ b/Source/core/frame/csp/CSPDirectiveList.cpp |
@@ -748,6 +748,11 @@ void CSPDirectiveList::addDirective(const String& name, const String& value) |
if (equalIgnoringCase(name, ContentSecurityPolicy::DefaultSrc)) { |
setCSPDirective<SourceListDirective>(name, value, m_defaultSrc); |
+ // TODO(mkwst) It seems unlikely that developers would use different |
+ // algorithms for scripts and styles. We may want to combine the |
+ // usesScriptHashAlgorithms() and usesStyleHashAlgorithms. |
+ m_policy->usesScriptHashAlgorithms(m_defaultSrc->hashAlgorithmsUsed()); |
+ m_policy->usesStyleHashAlgorithms(m_defaultSrc->hashAlgorithmsUsed()); |
} else if (equalIgnoringCase(name, ContentSecurityPolicy::ScriptSrc)) { |
setCSPDirective<SourceListDirective>(name, value, m_scriptSrc); |
m_policy->usesScriptHashAlgorithms(m_scriptSrc->hashAlgorithmsUsed()); |