Reland fuchsia_remote_debug_protocol allows open port on remote device (#66271)
This commit is contained in:
@@ -17,7 +17,10 @@ void validateAddress(String address) {
|
||||
/// Returns true if `address` is a valid IPv6 address.
|
||||
bool isIpV6Address(String address) {
|
||||
try {
|
||||
Uri.parseIPv6Address(address);
|
||||
// parseIpv6Address fails if there's a zone ID. Since this is still a valid
|
||||
// IP, remove any zone ID before parsing.
|
||||
final List<String> addressParts = address.split('%');
|
||||
Uri.parseIPv6Address(addressParts[0]);
|
||||
return true;
|
||||
} on FormatException {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user