mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
Remove support and tests for HSTS priming from the tree. Fixes #384
This commit is contained in:
parent
96a0af1be8
commit
d4ac94cf3e
56 changed files with 26 additions and 1812 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue