Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 77dd1c0

Browse files
authored
Revert "Pass platform configuration to Dart VM for insecure socket policy (#20733)" (#20812)
This reverts commit d241105.
1 parent dba308b commit 77dd1c0

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

shell/platform/android/io/flutter/embedding/engine/loader/FlutterLoader.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,10 @@ public void ensureInitializationComplete(
216216
}
217217

218218
shellArgs.add("--cache-dir-path=" + result.engineCachesPath);
219-
if (!flutterApplicationInfo.clearTextPermitted) {
220-
shellArgs.add("--disallow-insecure-connections");
221-
}
219+
// TODO(mehmetf): Announce this since it is a breaking change then enable it.
220+
// if (!flutterApplicationInfo.clearTextPermitted) {
221+
// shellArgs.add("--disallow-insecure-connections");
222+
// }
222223
if (flutterApplicationInfo.domainNetworkPolicy != null) {
223224
shellArgs.add("--domain-network-policy=" + flutterApplicationInfo.domainNetworkPolicy);
224225
}

shell/platform/darwin/ios/framework/Source/FlutterDartProject.mm

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@
140140
settings.domain_network_policy =
141141
[FlutterDartProject domainNetworkPolicy:appTransportSecurity].UTF8String;
142142

143+
// TODO(mehmetf): We need to announce this change since it is breaking.
144+
// Remove these two lines after we announce and we know which release this is
145+
// going to be part of.
146+
settings.may_insecurely_connect_to_all_domains = true;
147+
settings.domain_network_policy = "";
148+
143149
#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG
144150
// There are no ownership concerns here as all mappings are owned by the
145151
// embedder and not the engine.

0 commit comments

Comments
 (0)