зеркало из https://github.com/mozilla/gecko-dev.git
cfc1f8fa90
The problem is that we used ThirdPartyUtil.getBaseDomain and for IP addresses that returns the host, and for IPv6 addresses GetHost strips the '[' and ']' brackets. Then when we passed that IP address to SetHost, we failed because SetHost wants the brackets to be present. This patch changes GetSiteOrigin to call getBaseDomain on the TLD service instead, so we can handle this case ourselves by not calling SetHost when we have an IP address. GetBaseDomain still uses ThirdPartyUtil. I tried to add a test for this (with an iframe + postMessage) but the mochitest http server doesn't support IPv6. Differential Revision: https://phabricator.services.mozilla.com/D6523 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
tests | ||
BasePrincipal.cpp | ||
BasePrincipal.h | ||
ContentPrincipal.cpp | ||
ContentPrincipal.h | ||
DomainPolicy.cpp | ||
DomainPolicy.h | ||
ExpandedPrincipal.cpp | ||
ExpandedPrincipal.h | ||
NullPrincipal.cpp | ||
NullPrincipal.h | ||
NullPrincipalURI.cpp | ||
NullPrincipalURI.h | ||
OriginAttributes.cpp | ||
OriginAttributes.h | ||
SystemPrincipal.cpp | ||
SystemPrincipal.h | ||
moz.build | ||
nsIAddonPolicyService.idl | ||
nsIDomainPolicy.idl | ||
nsIPrincipal.idl | ||
nsIScriptSecurityManager.idl | ||
nsJSPrincipals.cpp | ||
nsJSPrincipals.h | ||
nsScriptSecurityManager.cpp | ||
nsScriptSecurityManager.h |