Be a little more careul with inheriting principals. Bug 304690, r=dveditz,

sr=jst


git-svn-id: svn://10.0.0.236/trunk@225122 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2007-04-27 04:01:17 +00:00
parent ee7f0e4a0d
commit 3f6c05c342

View File

@@ -6370,7 +6370,9 @@ nsDocShell::InternalLoad(nsIURI * aURI,
//
{
PRBool inherits;
if (!owner && (aFlags & INTERNAL_LOAD_FLAGS_INHERIT_OWNER) &&
// One more twist: Don't inherit the owner for external loads.
if (aLoadType != LOAD_NORMAL_EXTERNAL && !owner &&
(aFlags & INTERNAL_LOAD_FLAGS_INHERIT_OWNER) &&
NS_SUCCEEDED(URIInheritsSecurityContext(aURI, &inherits)) &&
inherits) {
owner = GetInheritedPrincipal(PR_TRUE);