mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1184387 - Bail out of file:// loads for all non-chrome:// URIs. r=Gijs
This commit is contained in:
parent
a6de0c748e
commit
b442330ce0
@ -843,18 +843,12 @@ nsScriptSecurityManager::CheckLoadURIWithPrincipal(nsIPrincipal* aPrincipal,
|
||||
}
|
||||
}
|
||||
|
||||
// resource: and chrome: are equivalent, securitywise
|
||||
// That's bogus!! Fix this. But watch out for
|
||||
// the view-source stylesheet?
|
||||
bool sourceIsChrome;
|
||||
rv = NS_URIChainHasFlags(sourceURI,
|
||||
nsIProtocolHandler::URI_IS_UI_RESOURCE,
|
||||
&sourceIsChrome);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
if (sourceIsChrome) {
|
||||
// Allow chrome://
|
||||
if (sourceScheme.EqualsLiteral("chrome")) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Nothing else.
|
||||
if (reportErrors) {
|
||||
ReportError(nullptr, errorTag, sourceURI, aTargetURI);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user