gecko-dev/caps
Kris Maglione 7cdbab4b1e Bug 1415352: Part 5b - Use the last component principal as principal to inherit for data: URLs. r=bz,krizsa
The logic for choosing the principal here was originally written before
loadInfo had a separate principalToInherit field, and we needed to specify it
via the triggeringPrincipal instead. At that point, we had to choose a
component principal with permission to load the URI at the start of the
request.

However, now that we have a separate field for the principal to inherit, it's
only needed after access checks have passed and we know that we have a URI
which inherits a principal. In that case, the current logic causes us to
always inherit the first principal in the whitelist (which is the page
principal) for URIs (such as data: URIs) that always inherit, where we really
want to inherit the last (which is the extension principal).

MozReview-Commit-ID: EPoUNuOCwrH

--HG--
extra : rebase_source : 535083e3dd4598ac4e8ea187d27d61ac2ac48476
2017-11-22 14:20:26 -08:00
..
tests Bug 1409148 - Drop the old contentPluginClose.png icon and replace it with the modern svg version. r=johannh 2017-11-10 14:05:00 -02:00
BasePrincipal.cpp Bug 1415352: Part 5b - Use the last component principal as principal to inherit for data: URLs. r=bz,krizsa 2017-11-22 14:20:26 -08:00
BasePrincipal.h Bug 1415352: Part 5b - Use the last component principal as principal to inherit for data: URLs. r=bz,krizsa 2017-11-22 14:20:26 -08:00
ContentPrincipal.cpp
ContentPrincipal.h
DomainPolicy.cpp
DomainPolicy.h
ExpandedPrincipal.cpp Bug 1415352: Part 5b - Use the last component principal as principal to inherit for data: URLs. r=bz,krizsa 2017-11-22 14:20:26 -08:00
ExpandedPrincipal.h Bug 1415352: Part 5b - Use the last component principal as principal to inherit for data: URLs. r=bz,krizsa 2017-11-22 14:20:26 -08:00
moz.build
nsIAddonPolicyService.idl
nsIDomainPolicy.idl
nsIPrincipal.idl Bug 1412345: Downgrade expanded principals before inheriting. r=bz,krizsa 2017-11-02 19:56:27 -07:00
nsIScriptSecurityManager.idl
nsJSPrincipals.cpp Bug 1414755 - Get rid of ContentPrincipalInfoOriginNoSuffix, r=bz, r=bkelly 2017-11-15 11:19:26 +01:00
nsJSPrincipals.h
nsScriptSecurityManager.cpp Bug 1412345: Downgrade expanded principals before inheriting. r=bz,krizsa 2017-11-02 19:56:27 -07:00
nsScriptSecurityManager.h Bug 1409249: Require singleton constructors to return explicit already_AddRefed. r=froydnj 2017-10-16 21:08:42 -07:00
NullPrincipal.cpp
NullPrincipal.h
NullPrincipalURI.cpp Bug 1415205 - Add nsIURIMutator impls for all objects implementing nsIURI r=bagder 2017-11-20 17:11:30 +01:00
NullPrincipalURI.h Bug 1415205 - Add nsIURIMutator impls for all objects implementing nsIURI r=bagder 2017-11-20 17:11:30 +01:00
OriginAttributes.cpp
OriginAttributes.h
SystemPrincipal.cpp
SystemPrincipal.h