mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
import from UXP: [image] Use the TriggeringPrincipal if we have one, not the SystemPrincipal (4667b7f4)
This commit is contained in:
+5
-2
@@ -765,10 +765,13 @@ NewImageChannel(nsIChannel** aResult,
|
||||
// outside a document, in which case the triggeringPrincipal and
|
||||
// triggeringPrincipal should always be the systemPrincipal.
|
||||
// However, there are exceptions: one is Notifications which create a
|
||||
// channel in the parent prcoess in which case we can't get a requestingNode.
|
||||
// channel separate from content, in which case we can't get a
|
||||
// requestingNode while we might still have a valid triggering principal.
|
||||
// Use the triggering principal if we have a valid one, fall back to
|
||||
// the system principal if we don't.
|
||||
rv = NS_NewChannel(aResult,
|
||||
aURI,
|
||||
nsContentUtils::GetSystemPrincipal(),
|
||||
aTriggeringPrincipal ? aTriggeringPrincipal : nsContentUtils::GetSystemPrincipal(),
|
||||
securityFlags,
|
||||
aPolicyType,
|
||||
nullptr, // loadGroup
|
||||
|
||||
Reference in New Issue
Block a user