diff options
author | Gaming4JC <g4jc@bulletmail.org> | 2018-05-26 15:00:01 -0400 |
---|---|---|
committer | Gaming4JC <g4jc@bulletmail.org> | 2018-05-26 15:42:45 -0400 |
commit | bd851735628cd6b07285e87fa60081e9d11a3b7e (patch) | |
tree | c4a2831c9188f2d68e57c3b379bf86e7ff54cf93 /docshell | |
parent | 8f354e52d09d1bf2fadfbbfc141d4f32241599a4 (diff) | |
download | uxp-bd851735628cd6b07285e87fa60081e9d11a3b7e.tar.gz |
Remove support and tests for HSTS priming from the tree. Fixes #384
Diffstat (limited to 'docshell')
-rw-r--r-- | docshell/base/nsDocShell.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index b3e26da333..8eca474950 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -9961,27 +9961,6 @@ nsDocShell::InternalLoad(nsIURI* aURI, return NS_ERROR_CONTENT_BLOCKED; } - - // If HSTS priming was set by nsMixedContentBlocker::ShouldLoad, and we - // would block due to mixed content, go ahead and block here. If we try to - // proceed with priming, we will error out later on. - nsCOMPtr<nsIDocShell> docShell = NS_CP_GetDocShellFromContext(requestingContext); - // When loading toplevel windows, requestingContext can be null. We don't - // really care about HSTS in that situation, though; loads in toplevel - // windows should all be browser UI. - if (docShell) { - nsIDocument* document = docShell->GetDocument(); - NS_ENSURE_TRUE(document, NS_OK); - - HSTSPrimingState state = document->GetHSTSPrimingStateForLocation(aURI); - if (state == HSTSPrimingState::eHSTS_PRIMING_BLOCK) { - // HSTS Priming currently disabled for InternalLoad, so we need to clear - // the location that was added by nsMixedContentBlocker::ShouldLoad - // Bug 1269815 will address images loaded via InternalLoad - document->ClearHSTSPrimingLocation(aURI); - return NS_ERROR_CONTENT_BLOCKED; - } - } } nsCOMPtr<nsIPrincipal> principalToInherit = aPrincipalToInherit; |