Bug 1735746 - Block external protocol navigation from sandboxed contexts. r=nika,ckerschb,Gijs,smaug

Differential Revision: https://phabricator.services.mozilla.com/D141131
This commit is contained in:
Paul Zuehlcke
2022-04-20 11:06:50 +00:00
parent e3df4d1993
commit 89b9ce04f7
11 changed files with 78 additions and 14 deletions

View File

@@ -12993,9 +12993,12 @@ nsresult nsDocShell::OnLinkClickSync(nsIContent* aContent,
nsresult rv =
extProtService->IsExposedProtocol(scheme.get(), &isExposed);
if (NS_SUCCEEDED(rv) && !isExposed) {
return extProtService->LoadURI(aLoadState->URI(), triggeringPrincipal,
nullptr, mBrowsingContext,
/* aTriggeredExternally */ false);
return extProtService->LoadURI(
aLoadState->URI(), triggeringPrincipal, nullptr, mBrowsingContext,
/* aTriggeredExternally */
false,
/* aHasValidUserGestureActivation */
aContent->OwnerDoc()->HasValidTransientUserGestureActivation());
}
}
}