Repository navigation
Studio: leave a bracketed IPv6 host unchanged in dial_host - #12733
Conversation
|
Confirmed dial_host in studio/backend/utils/host_policy.py still turns "[::1]" into "[[::1]]" on main, unlike published_url_host just above it, and this mirrors that guard. Will get this reviewed. |
… formatters published_url_host and dial_host each carried their own copy of the bracket rule, and the copies had drifted: only one left an already-bracketed literal alone. Both now call one helper, so they differ only in whether the zone id is percent-escaped. Tests pin the zone id staying literal for dial_host and bracketed input with a zone id for published_url_host.
|
Pushed a small follow-up on top of the original fix and merged the latest What changed:
Note for reviewers: I traced both callers and no current path hands cd studio/backend && python -m pytest tests/test_bind_host_policy.py -q # 68 passed |
|
Review and CI summary for head Codex review: converged — "Didn't find any major issues". CI: 40 passed, 2 skipped, 1 failed (run). The one failure is What changed during this pass:
There were no unresolved review threads to address. |
Lyxot
left a comment
There was a problem hiding this comment.
Looks good. The two host formatters now share one bracket rule, and the change is covered by tests. Codex and CI were checked on a staging mirror of the same head; the one failing CI job fails identically on main.
Fixes #12719.
dial_host("[::1]")returned"[[::1]]", which is not a valid URL authority, so a bracketed IPv6 host would break the self-call URLs built from it.published_url_hostalready returns bracketed input unchanged.dial_hostnow does the same, and a test covers it.Ran the host policy test file on the committed HEAD: 3 passed.