[dart:io] Disable isInsecureConnectionAllowed check as it broken

an internal test on Fuchsia.

Change-Id: I1fc6124b7dbdd07a82d09daf5c870971e0c237de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156720
Commit-Queue: Mehmet Fidanboylu <mehmetf@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
This commit is contained in:
Mehmet Fidanboylu 2020-07-31 16:45:00 +00:00 committed by commit-bot@chromium.org
parent 4894e34f1f
commit 336a733e44
3 changed files with 16 additions and 8 deletions

View file

@ -801,10 +801,12 @@ abstract class Socket implements Stream<Uint8List>, IOSink {
{sourceAddress, Duration? timeout}) {
final IOOverrides? overrides = IOOverrides.current;
if (overrides == null) {
if (!isInsecureConnectionAllowed(host)) {
throw new SocketException(
"Insecure socket connections are disallowed by platform: $host");
}
// TODO(b/162514236): This breaks internal device lab tests for Fuchsia.
//
// if (!isInsecureConnectionAllowed(host)) {
// throw new SocketException(
// "Insecure socket connections are disallowed by platform: $host");
// }
return Socket._connect(host, port,
sourceAddress: sourceAddress, timeout: timeout);
}
@ -819,10 +821,12 @@ abstract class Socket implements Stream<Uint8List>, IOSink {
{sourceAddress}) {
final IOOverrides? overrides = IOOverrides.current;
if (overrides == null) {
if (!isInsecureConnectionAllowed(host)) {
throw new SocketException(
"Insecure socket connections are disallowed by platform: $host");
}
// TODO(b/162514236): This breaks internal device lab tests for Fuchsia.
//
// if (!isInsecureConnectionAllowed(host)) {
// throw new SocketException(
// "Insecure socket connections are disallowed by platform: $host");
// }
return Socket._startConnect(host, port, sourceAddress: sourceAddress);
}
return overrides.socketStartConnect(host, port,

View file

@ -7,6 +7,8 @@
fragmentation_test: Pass, Slow # GC heavy
fragmentation_typed_data_test: Pass, Slow # GC heavy
io/process_sync_test: Pass, Slow # Spawns synchronously subprocesses in sequence.
io/socket_network_policy_test: Skip # Temporarily disabled.
io/socket_network_policy_localhost_test: Skip # Temporarily disabled.
[ $compiler == dartkb ]
no_lazy_dispatchers_test: SkipByDesign # KBC interpreter doesn't support --no_lazy_dispatchers

View file

@ -7,6 +7,8 @@
fragmentation_test: Pass, Slow # GC heavy
fragmentation_typed_data_test: Pass, Slow # GC heavy
io/process_sync_test: Pass, Slow # Spawns synchronously subprocesses in sequence.
io/socket_network_policy_test: Skip # Temporarily disabled.
io/socket_network_policy_localhost_test: Skip # Temporarily disabled.
[ $compiler == dartkb ]
no_lazy_dispatchers_test: SkipByDesign # KBC interpreter doesn't support --no_lazy_dispatchers