gecko-dev/caps
Jan de Mooij cfc1f8fa90 Bug 1491728 - Fix ContentPrincipal::GetSiteOrigin to handle IPv6 addresses correctly. r=bzbarsky
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
2018-10-01 12:16:39 +00:00
..
tests Bug 1473933: Remove xpinstallConfirm dialog. r=aswan 2018-09-25 15:33:52 -07:00
BasePrincipal.cpp Bug 1490874: Log Principal based Security Errors to the Security pane in the console. r=smaug 2018-09-25 07:25:05 +02:00
BasePrincipal.h Bug 1491342 - Ignore document.domain in ShouldWaiveXray. r=bholley 2018-09-21 07:13:15 +00:00
ContentPrincipal.cpp Bug 1491728 - Fix ContentPrincipal::GetSiteOrigin to handle IPv6 addresses correctly. r=bzbarsky 2018-10-01 12:16:39 +00:00
ContentPrincipal.h Bug 1487032 - Store origin/site info in CompartmentPrivate. r=bholley 2018-09-11 09:01:14 +00:00
DomainPolicy.cpp Bug 1433958 - Change code that sets nsIURI.host to use nsIURIMutator r=mayhemer 2018-02-26 20:43:47 +01:00
DomainPolicy.h
ExpandedPrincipal.cpp Bug 1487032 - Store origin/site info in CompartmentPrivate. r=bholley 2018-09-11 09:01:14 +00:00
ExpandedPrincipal.h Bug 1487032 - Store origin/site info in CompartmentPrivate. r=bholley 2018-09-11 09:01:14 +00:00
moz.build Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 3 - ContentPrincipal, r=ckerschb 2018-07-17 21:38:48 +02:00
nsIAddonPolicyService.idl Bug 1356334: Part 4 - Add a helper to synchronously get an extension's name from its ID. r=billm 2017-08-11 21:22:18 -07:00
nsIDomainPolicy.idl
nsIPrincipal.idl Bug 1485177 - Add |siteOrigin| information to nsIPrincipal r=Ehsan 2018-09-05 03:22:16 +00:00
nsIScriptSecurityManager.idl Bug 1490874: Log Principal based Security Errors to the Security pane in the console. r=smaug 2018-09-25 07:25:05 +02:00
nsJSPrincipals.cpp Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj 2018-04-28 12:50:58 -07:00
nsJSPrincipals.h Bug 1436263 - Part 1: Replace final override virtual function specifiers with just final. r=froydnj 2018-02-05 22:46:57 -08:00
nsScriptSecurityManager.cpp Bug 1490874: Log Principal based Security Errors to the Security pane in the console. r=smaug 2018-09-25 07:25:05 +02:00
nsScriptSecurityManager.h Bug 1490874: Log Principal based Security Errors to the Security pane in the console. r=smaug 2018-09-25 07:25:05 +02:00
NullPrincipal.cpp Bug 1228139 - Remove nsIURIWithPrincipal - part 3 - main part, r=bz 2018-07-24 22:15:57 +02:00
NullPrincipal.h Bug 1487032 - Store origin/site info in CompartmentPrivate. r=bholley 2018-09-11 09:01:14 +00:00
NullPrincipalURI.cpp Bug 1476928 - Remove nsIURI.CloneIgnoringRef and nsIURI.CloneWithNewRef r=JuniorHsu 2018-07-23 11:28:47 +00:00
NullPrincipalURI.h Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 1 - NullPrincipal, r=ckerschb 2018-07-17 21:37:48 +02:00
OriginAttributes.cpp Bug 1228139 - Remove nsIURIWithPrincipal - part 3 - main part, r=bz 2018-07-24 22:15:57 +02:00
OriginAttributes.h
SystemPrincipal.cpp Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 2 - SystemPrincipal, r=ckerschb 2018-07-17 21:38:19 +02:00
SystemPrincipal.h Bug 1487032 - Store origin/site info in CompartmentPrivate. r=bholley 2018-09-11 09:01:14 +00:00