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

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

Issue 978323002: Upgrade insecure requests: Pipe navigational hosts down into nested documents. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/fetch/ResourceFetcherTest.cpp ('k') | Source/core/frame/csp/ContentSecurityPolicyTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/csp/ContentSecurityPolicy.cpp
diff --git a/Source/core/frame/csp/ContentSecurityPolicy.cpp b/Source/core/frame/csp/ContentSecurityPolicy.cpp
index acf852427b319190516be019a0bea00ca2a77e89..6d91ccea2c32b10dc74d4c71bbee99b460d0713f 100644
--- a/Source/core/frame/csp/ContentSecurityPolicy.cpp
+++ b/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -176,8 +176,10 @@ void ContentSecurityPolicy::applyPolicySideEffectsToExecutionContext()
document->enforceStrictMixedContentChecking();
if (didSetReferrerPolicy())
document->setReferrerPolicy(m_referrerPolicy);
- if (m_insecureRequestsPolicy > document->insecureRequestsPolicy())
+ if (m_insecureRequestsPolicy > document->insecureRequestsPolicy()) {
document->setInsecureRequestsPolicy(m_insecureRequestsPolicy);
+ document->addInsecureNavigationUpgrade(securityOrigin()->host().impl()->hash());
+ }
for (const auto& consoleMessage : m_consoleMessages)
m_executionContext->addConsoleMessage(consoleMessage);
« no previous file with comments | « Source/core/fetch/ResourceFetcherTest.cpp ('k') | Source/core/frame/csp/ContentSecurityPolicyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698