Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## 27.1.2-wip

- Remove the `badCertificateCallback` override in `ProxyServerAssetReader` that
unconditionally accepted any TLS certificate when `isHttps: true` was set.
Callers that need to trust a private CA should configure a `SecurityContext`
on the `HttpClient` themselves. (CWE-295)

## 27.1.1

- Fix deserialization errors appearing in the chrome console.
Expand Down
4 changes: 1 addition & 3 deletions dwds/lib/src/readers/proxy_server_asset_reader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ class ProxyServerAssetReader implements AssetReader {
..maxConnectionsPerHost = 200
..idleTimeout = const Duration(seconds: 30)
..connectionTimeout = const Duration(seconds: 30);
final client = isHttps
? IOClient(inner..badCertificateCallback = (cert, host, port) => true)
: IOClient(inner);
final client = IOClient(inner);
var url = '$scheme$host:$assetServerPort/';
if (root.isNotEmpty) url += '$root/';
final handler = proxyHandler(url, client: client);
Expand Down