mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
moebius#230: Consider blocking top level window data: URIs (part 3/3 without tests)
https://github.com/MoonchildProductions/moebius/pull/230
This commit is contained in:
parent
73f89fe562
commit
18d312235d
20 changed files with 143 additions and 3 deletions
|
|
@ -39,6 +39,10 @@ nsContentSecurityManager::AllowTopLevelNavigationToDataURI(nsIChannel* aChannel)
|
|||
if (loadInfo->GetExternalContentPolicyType() != nsIContentPolicy::TYPE_DOCUMENT) {
|
||||
return true;
|
||||
}
|
||||
if (loadInfo->GetForceAllowDataURI()) {
|
||||
// if the loadinfo explicitly allows the data URI navigation, let's allow it now
|
||||
return true;
|
||||
}
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = NS_GetFinalChannelURI(aChannel, getter_AddRefs(uri));
|
||||
NS_ENSURE_SUCCESS(rv, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue