summaryrefslogtreecommitdiffstats
path: root/docshell/base/nsDocShell.cpp
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-05-30 12:47:56 +0200
committerGitHub <noreply@github.com>2018-05-30 12:47:56 +0200
commit9f6194d00034f0bd67d2b8c97fd26586d2a7a9ed (patch)
tree7512b05f873bcfe8d0f79c34370d0bebad70a07f /docshell/base/nsDocShell.cpp
parent6e8846622a79549542adaca58d741d9263daf686 (diff)
parentbd851735628cd6b07285e87fa60081e9d11a3b7e (diff)
downloadUXP-9f6194d00034f0bd67d2b8c97fd26586d2a7a9ed.tar
UXP-9f6194d00034f0bd67d2b8c97fd26586d2a7a9ed.tar.gz
UXP-9f6194d00034f0bd67d2b8c97fd26586d2a7a9ed.tar.lz
UXP-9f6194d00034f0bd67d2b8c97fd26586d2a7a9ed.tar.xz
UXP-9f6194d00034f0bd67d2b8c97fd26586d2a7a9ed.zip
Merge pull request #412 from g4jc/hsts_priming_removal_backport
Remove support and tests for HSTS priming from the tree. Fixes #384
Diffstat (limited to 'docshell/base/nsDocShell.cpp')
-rw-r--r--docshell/base/nsDocShell.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
index b3e26da33..8eca47495 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;