fix: harden network interception and bump to 1.3.3 - #46
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 摘要
Harden network interception (cryptographic request-ID uniqueness, 512 KB body cap to prevent OOM, safe binary/non-UTF-8 handling) and bump the package and iOS podspec to 1.3.3. / 加固网络拦截(加密级请求 ID 唯一性、512 KB 请求体上限防 OOM、安全的二进制/非 UTF-8 处理),并将包与 iOS podspec 版本提升至 1.3.3。
Changes / 变更
InspectorHttpClientandInspectorDioInterceptorto microsecond timestamp +Random.secure()+ monotonic counter, eliminating duplicate IDs under concurrency. / 统一InspectorHttpClient与InspectorDioInterceptor的请求 ID 生成为「微秒时间戳 + Random.secure() + 自增计数器」,消除并发下的重复 ID。contentLength == -1inInspectorResponseProxy. /InspectorResponseProxy在contentLength == -1时显示 unknown size。pubspec.yamlto 1.3.3 andios/zero_inspector_kit.podspecto 1.3.3 (was stale at 1.2.2). /pubspec.yaml升至 1.3.3,ios/zero_inspector_kit.podspec升至 1.3.3(此前停留在 1.2.2)。request_id_collision_test.dart,http_interceptor_test.dart, and a concurrent-ID uniqueness group inmodels_test.dart. / 新增测试:request_id_collision_test.dart、http_interceptor_test.dart,以及models_test.dart中的并发 ID 唯一性测试组。Context / 背景
Three Trae-generated branches (
trae/agent-Ovp5X2,trae/agent-g6rcvw,trae/agent-q9jzwN) each patched part of the same interception robustness issues with overlapping/conflicting edits. They were consolidated into this single branch (Ovp5X2's lib implementation kept as the base, g6rcvw's and q9jzwN's tests merged in) so the fixes ship together in one release. / 三个 Trae 分支各自只修补了同一组拦截健壮性问题的一部分且改动相互冲突,已整合到本分支(以 Ovp5X2 的 lib 实现为基础,合并 g6rcvw 与 q9jzwN 的测试),以便随同一版本发布。Checklist / 检查项
Test plan
flutter analyzepasses / flutter analyze 通过flutter testpasses (173 tests) / flutter test 通过(173 项)dart format .reports no changes / dart format . 无改动🤖 Generated with Zero Buddy