Repository navigation
tracer: Bracket IPv6 hosts in allowed UI origins - #208
Open
protonnegativo wants to merge 1 commit into
Open
protonnegativo wants to merge 1 commit into
protonnegativo wants to merge 1 commit into
Conversation
Browsers send IPv6 origins as http://[::1]:PORT, but the allow-list was built as http://::1:PORT, so with --ui-host ::1 every request to the UI was rejected with 403. Fixes frida#203
protonnegativo
marked this pull request as ready for review
October 24, 2026 03:40
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.
Fixes #203
With
--ui-host ::1the allowed origins were built ashttp://::1:PORT, while the browser sendsOrigin: http://[::1]:PORT, so every UI request got a 403.compute_allowed_ui_origins()now wraps hosts containing:in brackets. The same applies to--ui-host ::, which producedhttp://:::PORTand now giveshttp://[::]:PORT.Repro on main (d4e287e):
With this change the same request returns
200 OKwith the UI'sindex.html.Testing:
test_ipv6_ui_origin_is_bracketedandtest_ipv6_bind_origin_is_bracketedtotests/test_tracer.py(both fail without the fix)python -m unittest tests.test_tracer -v: 7 tests OKblack --check,isort --check-onlyandpyflakeson the touched filesI didn't make
--ui-host ::also allowhttp://[::1]:PORT, the way0.0.0.0allows127.0.0.1. That widens what gets accepted, so I left it out. Happy to add it if you want it.