commit | ed519e442491476fbf09e2e419efb27716a94bed | [log] [tgz] |
---|---|---|
author | Jiacheng Guo <[email protected]> | Fri Feb 17 05:46:23 2023 |
committer | Chromium LUCI CQ <[email protected]> | Fri Feb 17 05:46:23 2023 |
tree | a56ad9501dfa1e1c43382e86c66f0e72e2b2cc12 | |
parent | 2e20da8d85b27564309b24944ba57313a5feaa40 [diff] [blame] |
Make IPv6-embedded IPv4 addresses parse only if they have 4 parts The URL standard requires the IPv6-embedded IPv4 address to be consicely composed of 4 parts. A check is added in the URL host parser to fix the WPT test failures. The feature is implemented behind the StrictIPv6EmbeddedIPv4AddressParsing flag. Bug: 1411619 Change-Id: I9062aef7279b899db961613b6e42f6095d2101d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4206417 Reviewed-by: Tommy Li <[email protected]> Reviewed-by: Charlie Harrison <[email protected]> Reviewed-by: Tom Sepez <[email protected]> Commit-Queue: Jiacheng Guo <[email protected]> Reviewed-by: Weizhong Xia <[email protected]> Cr-Commit-Position: refs/heads/main@{#1106646}
diff --git a/url/url_features.cc b/url/url_features.cc index 25132d1..0cffe3d2 100644 --- a/url/url_features.cc +++ b/url/url_features.cc
@@ -15,6 +15,10 @@ "RecordIDNA2008Metrics", base::FEATURE_ENABLED_BY_DEFAULT); +BASE_FEATURE(kStrictIPv4EmbeddedIPv6AddressParsing, + "StrictIPv4EmbeddedIPv6AddressParsing", + base::FEATURE_DISABLED_BY_DEFAULT); + bool IsUsingIDNA2008NonTransitional() { return base::FeatureList::IsEnabled(kUseIDNA2008NonTransitional); }