DescriptionRevert of Reduce buggy usage of the registry controlled domain service. (patchset #2 id:20001 of https://codereview.chromium.org/2451353002/ )
Reason for revert:
Failing DCHECK_EQ in GetCanonicalHostRegistryLength on WebKit Mac10.11 (dbg) running http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains.html
BUG=659949
Original issue's description:
> Reduce buggy usage of the registry controlled domain service.
>
> GetRegistryLength for host names canonicalizes the input for the caller, but
> then returns the length in the canonicalized input, which is not necessarily
> the same as the length in the original string. As a result, computations
> performed by the caller based on this value can be wrong (see the bug for
> more).
>
> All callers of this function were audited and changed to use on of the
> following:
>
> - Many callers don't need the offsets. A new function
> HostHasRegistryControlledDomain is added to check for the presence of
> a R.C.D. without the risk of returning incorrect string lengths.
>
> - Many callers already have guaranteed-canonical strings (they came out of
> a GURL or KURL object soon before the call) These were changed to use a
> new GetCanonicalHostRegistryLength function. A further advantage is that
> these calls will be faster.
>
> - A new Permissive function is added that handles cases where the input
> is necessarily non-canonical.
>
> Adds an IDN test case to the unit tests.
>
> Removes checking for IP addresses in the already-known-canonical cases.
> This requires a separate full canonicalization and IP addresses should
> never match the R.C.D. list.
>
> Reland of https://codereview.chromium.org/2446273004/ with fix which was a
> reland of https://codereview.chromium.org/2433583002/ with fix.
>
> TBR=pkasting@chromium.org
> BUG=657199
>
> Committed: https://crrev.com/1b0d95acde33777b9b9ab136c35eeefc11a64718
> Cr-Commit-Position: refs/heads/master@{#427908}
TBR=pkasting@chromium.org,brettw@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=657199
Committed: https://crrev.com/f2903f44f5ed9d756fb182a0fdd88fe85d172aab
Cr-Commit-Position: refs/heads/master@{#427984}
Patch Set 1 #Messages
Total messages: 7 (3 generated)
|