Bug 1753352 - Inherit principal into about:blank with query string. r=nika

Differential Revision: https://phabricator.services.mozilla.com/D212093
This commit is contained in:
Henri Sivonen
2024-07-17 16:12:53 +00:00
parent 44d99735f2
commit 7d94c50478
14 changed files with 53 additions and 40 deletions

View File

@@ -10074,7 +10074,7 @@ nsIPrincipal* nsDocShell::GetInheritedPrincipal(
bool nsDocShell::IsAboutBlankLoadOntoInitialAboutBlank(
nsIURI* aURI, bool aInheritPrincipal, nsIPrincipal* aPrincipalToInherit) {
return NS_IsAboutBlank(aURI) && aInheritPrincipal &&
return NS_IsAboutBlankAllowQueryAndFragment(aURI) && aInheritPrincipal &&
(aPrincipalToInherit == GetInheritedPrincipal(false)) &&
(!mDocumentViewer || !mDocumentViewer->GetDocument() ||
mDocumentViewer->GetDocument()->IsInitialDocument());