diff --git a/runtime/tests/concurrency/stress_test_list.json b/runtime/tests/concurrency/stress_test_list.json index c40bb0d7421..f0310dca16e 100644 --- a/runtime/tests/concurrency/stress_test_list.json +++ b/runtime/tests/concurrency/stress_test_list.json @@ -3315,7 +3315,6 @@ "../../../tests/standalone/io/many_file_operations_test.dart", "../../../tests/standalone/io/named_pipe_script_test.dart", "../../../tests/standalone/io/network_interface_test.dart", - "../../../tests/standalone/io/network_policy_test.dart", "../../../tests/standalone/io/parent_test.dart", "../../../tests/standalone/io/platform_os_version_test.dart", "../../../tests/standalone/io/process_exit_test.dart", @@ -6637,7 +6636,6 @@ "../../../tests/standalone_2/io/many_directory_operations_test.dart", "../../../tests/standalone_2/io/many_file_operations_test.dart", "../../../tests/standalone_2/io/network_interface_test.dart", - "../../../tests/standalone_2/io/network_policy_test.dart", "../../../tests/standalone_2/io/parent_test.dart", "../../../tests/standalone_2/io/platform_os_version_test.dart", "../../../tests/standalone_2/io/process_exit_test.dart", diff --git a/sdk/lib/io/embedder_config.dart b/sdk/lib/io/embedder_config.dart index 9b934a6c9d9..bcb4a01d519 100644 --- a/sdk/lib/io/embedder_config.dart +++ b/sdk/lib/io/embedder_config.dart @@ -36,24 +36,6 @@ abstract class _EmbedderConfig { @pragma('vm:entry-point') static bool _maySleep = true; - /// Whether the isolate may establish insecure socket connections - /// to all domains. - /// - /// This setting can be overridden by per-domain policies. - @Deprecated( - "To be re-implemented in https://github.com/flutter/flutter/issues/54448") - @pragma('vm:entry-point') - static bool _mayInsecurelyConnectToAllDomains = true; - - /// Domain network policies set by embedder. - @Deprecated( - "To be re-implemented in https://github.com/flutter/flutter/issues/54448") - @pragma('vm:entry-point') - static void _setDomainPolicies(String domainNetworkPolicyJson) { - // Doesn't do anything because the implementation has been reverted in - // https://github.com/flutter/flutter/issues/72723. - } - // TODO(zra): Consider adding: // - an option to disallow modifying SecurityContext.defaultContext // - an option to disallow closing stdout and stderr. diff --git a/sdk/lib/io/io.dart b/sdk/lib/io/io.dart index dbecc26cb17..014acd450ea 100644 --- a/sdk/lib/io/io.dart +++ b/sdk/lib/io/io.dart @@ -220,7 +220,6 @@ part 'io_sink.dart'; part 'io_service.dart'; part 'link.dart'; part 'namespace_impl.dart'; -part 'network_policy.dart'; part 'network_profiling.dart'; part 'overrides.dart'; part 'platform.dart'; diff --git a/sdk/lib/io/io_sources.gni b/sdk/lib/io/io_sources.gni index fb148df2b17..7410a13530e 100644 --- a/sdk/lib/io/io_sources.gni +++ b/sdk/lib/io/io_sources.gni @@ -20,7 +20,6 @@ io_sdk_sources = [ "io_sink.dart", "link.dart", "namespace_impl.dart", - "network_policy.dart", "network_profiling.dart", "overrides.dart", "platform.dart", diff --git a/sdk/lib/io/network_policy.dart b/sdk/lib/io/network_policy.dart deleted file mode 100644 index ef00ffc6771..00000000000 --- a/sdk/lib/io/network_policy.dart +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -part of dart.io; - -/// Whether insecure connections to [host] are allowed. -/// -/// This API is deprecated and always returns true. See -/// https://github.com/flutter/flutter/issues/72723 for more details. -/// -/// [host] must be a [String] or [InternetAddress]. -/// -/// If any of the domain policies match [host], the matching policy will make -/// the decision. If multiple policies apply, the top matching policy makes the -/// decision. If none of the domain policies match, the embedder default is -/// used. -/// -/// Loopback addresses are always allowed. -@Deprecated("See https://github.com/flutter/flutter/issues/54448 for followup") -bool isInsecureConnectionAllowed(dynamic host) { - return true; -} diff --git a/tests/standalone/io/network_policy_test.dart b/tests/standalone/io/network_policy_test.dart deleted file mode 100644 index 2f9878da10f..00000000000 --- a/tests/standalone/io/network_policy_test.dart +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'dart:io'; - -import "package:expect/expect.dart"; - -void _checkAllows(List domains) { - for (final domain in domains) { - Expect.isTrue( - isInsecureConnectionAllowed(domain), "$domain should be allowed."); - } -} - -void main() { - // All domains and addresses are allowed. - _checkAllows([ - "mailfoobar.com", - "abc.com", - "oobar.com", - "foobar.co", - "128.221.55.31", - "fe80::4607:0bff:fea0:7747%invalid", - "baz.foobar.com", - "foobar.com", - "test.baz.foobar.com", - "test2.test.baz.foobar.com", - "::1", - "localhost", - ]); -} diff --git a/tests/standalone_2/io/network_policy_test.dart b/tests/standalone_2/io/network_policy_test.dart deleted file mode 100644 index 108f1d43d53..00000000000 --- a/tests/standalone_2/io/network_policy_test.dart +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// @dart = 2.9 - -import 'dart:io'; - -import "package:expect/expect.dart"; - -void _checkAllows(List domains) { - for (final domain in domains) { - Expect.isTrue( - isInsecureConnectionAllowed(domain), "$domain should be allowed."); - } -} - -void main() { - // All domains and addresses are allowed. - _checkAllows([ - "mailfoobar.com", - "abc.com", - "oobar.com", - "foobar.co", - "128.221.55.31", - "fe80::4607:0bff:fea0:7747%invalid", - "baz.foobar.com", - "foobar.com", - "test.baz.foobar.com", - "test2.test.baz.foobar.com", - "::1", - "localhost", - ]); -}