diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index a67bc694d89..250c77c503a 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -6782,8 +6782,8 @@ nsDocShell::InternalLoad(nsIURI * aURI, // 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) || URIIsLocalFile(aURI))) { + NS_SUCCEEDED(URIInheritsSecurityContext(aURI, &inherits)) && + inherits) { // Don't allow loads that would inherit our security context // if this document came from an unsafe channel. diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index bfac64a8483..a14616c36f2 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -876,8 +876,8 @@ nsWebShell::OnLinkClickSync(nsIContent *aContent, rv = InternalLoad(aURI, // New URI referer, // Referer URI - nsnull, // No onwer - INTERNAL_LOAD_FLAGS_INHERIT_OWNER, // Inherit owner from document + aContent->NodePrincipal(), // Owner is our node's principal + INTERNAL_LOAD_FLAGS_NONE, target.get(), // Window target NS_LossyConvertUTF16toASCII(typeHint).get(), aPostDataStream, // Post data stream