Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:Update
MozillaFirefox.962
mozilla-fix_expanded_principals.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mozilla-fix_expanded_principals.patch of Package MozillaFirefox.962
# HG changeset patch # Parent 9c10634ff69dd227244910aa9733e7fd93013aa0 Fix expanded principals bustage bsc#940918 two upstream commits taken from mozilla-esr38: # User Boris Zbarsky <bzbarsky@mit.edu> # Date 1438833560 -43200 # Thu Aug 06 15:59:20 2015 +1200 # Branch SEAMONKEY_2_35_RELEASE_BRANCH # Node ID d7c2765a5d4f65a7153859dce53730c871ad933e Bug 1178058. Don't convert an expanded principal into inheriting the current principal. Just pretend like the null principal did the load (like LOAD_FLAGS_DISALLOW_INHERIT_OWNER does). r=bholley a=ritu a=Ratty SEAMONKEY_2_35_RELEASE_BRANCH CLOSED TREE # User Bobby Holley <bobbyholley@gmail.com> # Date 1438842596 -43200 # Thu Aug 06 18:29:56 2015 +1200 # Branch SEAMONKEY_2_35_RELEASE_BRANCH # Node ID f2340e330310ce58b356553bf413e07f96f1c3f0 Bug 1178058, followup fix for older branch, r=dveditz, a=dveditz a=Ratty SEAMONKEY_2_35_RELEASE_BRANCH CLOSED TREE diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -1541,22 +1541,31 @@ nsDocShell::LoadURI(nsIURI * aURI, // created later from the channel's internal data. // // NOTE: This all only works because the only thing the owner is used // for in InternalLoad is data:, javascript:, and about:blank // URIs. For other URIs this would all be dead wrong! if (owner && mItemType != typeChrome) { nsCOMPtr<nsIPrincipal> ownerPrincipal = do_QueryInterface(owner); - if (nsContentUtils::IsSystemOrExpandedPrincipal(ownerPrincipal)) { + if (nsContentUtils::IsSystemPrincipal(ownerPrincipal)) { if (ownerIsExplicit) { return NS_ERROR_DOM_SECURITY_ERR; } owner = nullptr; inheritOwner = true; + } else if (nsContentUtils::IsExpandedPrincipal(ownerPrincipal)) { + if (ownerIsExplicit) { + return NS_ERROR_DOM_SECURITY_ERR; + } + // Don't inherit from the current page. Just do the safe thing + // and pretend that we were loaded by a nullprincipal. + owner = do_CreateInstance("@mozilla.org/nullprincipal;1"); + NS_ENSURE_TRUE(owner, NS_ERROR_FAILURE); + inheritOwner = false; } } if (!owner && !inheritOwner && !ownerIsExplicit) { // See if there's system or chrome JS code running inheritOwner = nsContentUtils::IsSystemPrincipal( nsContentUtils::GetSubjectPrincipal()); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor