Repository navigation
Conversation
compute_allowed_ui_origins() built the allow-list with plain string interpolation, so an IPv6 bind host produced entries like http://::1:9230. Browsers always send the bracketed form (http://[::1]:9230) per RFC 3986, so the check in _handle_asset_request() never matched and the web UI rejected every request from a browser reaching it over IPv6 with 403. Bracket IPv6 literals when serializing origins, and cover ::1 when binding to the :: wildcard, mirroring how 0.0.0.0 covers 127.0.0.1.
Member
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
compute_allowed_ui_origins()built the allow-list with plain string interpolation, so an IPv6 bind host produced entries likehttp://::1:9230. Browsers always send the bracketed form (http://[::1]:9230, RFC 3986 §3.2.2), so the exact-match check in_handle_asset_request()never matched and the web UI answered403 Cross-origin request deniedto its own origin.::, also allow[::1], mirroring how0.0.0.0already allows127.0.0.1.Non-IPv6 behaviour is unchanged.
Verification
Against a real device process,
frida-trace -U -p <pid> --ui-host ::1 --ui-port 9230:Origin: http://[::1]:9230Origin: http://evil.testOrigin(The
--uiflag in the original report does not exist in currentmain; the UI starts when--ui-host/--ui-portare supplied.)Unit tests are added to
tests/test_tracer.py(TestTracerUiOrigins, 7/7 passing).Fixes #203