mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Allow a signed jar to load scripts which are at least as privileged as the jar. Bug 428873, r+sr=jst, a=beltzner
This commit is contained in:
parent
d6732d2103
commit
de3cfbb932
@ -891,9 +891,9 @@ nsScriptLoader::ShouldExecuteScript(nsIDocument* aDocument,
|
||||
|
||||
NS_ASSERTION(channelPrincipal, "Gotta have a principal here!");
|
||||
|
||||
// If the document principal is a cert principal and is not the same
|
||||
// as the channel principal, then we don't execute the script.
|
||||
PRBool equal;
|
||||
rv = docPrincipal->Equals(channelPrincipal, &equal);
|
||||
return NS_SUCCEEDED(rv) && equal;
|
||||
// If the channel principal isn't at least as powerful as the
|
||||
// document principal, then we don't execute the script.
|
||||
PRBool subsumes;
|
||||
rv = channelPrincipal->Subsumes(docPrincipal, &subsumes);
|
||||
return NS_SUCCEEDED(rv) && subsumes;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user