Repository navigation
fix(lab-ops-hub): WHATWG parity for symbol hosts in container validator (#8428) - #9735
Conversation
…or (#8428) The #588 category check in _judge_idna_label refused every P/S/Z-category character on the premise that the Worker refuses currency/math symbols. That premise is false for the WHATWG URL path the Worker uses: Node domainToASCII accepts the So/Sc/Sm symbols (emoji -> xn--e28h, cent/euro/currency signs) and refuses the Sk modifier symbols and punctuation/separators. The container suite therefore failed on clean main (the #659 A-label test) while an older #588 test pinned Sc refusals — the two copies disagreed. Parity rule: refuse P/Z categories and Sk, keep Co/Cs refusal and the CONTEXTO exceptions; accept So/Sc/Sm. Rationale recorded in the code comment: accepting these labels is not an SSRF weakening (they resolve through ordinary public DNS to the same A-label the Worker certifies; address-class refusals live elsewhere). Tests: existing Sc refusal cases moved to accepted controls, new test_symbol_hosts_match_whatwg_parity covers the Node-verified battery in raw and A-label forms. Python suite 82 tests OK; TypeScript suite 116 pass.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Fixes the symbol-host parity conflict in #8428 (the recorded blocker for #7715, task 14507).
Decision (recorded on #8428)
Match WHATWG/Worker. The #588 category check refused every punctuation/symbol/separator-category character on the premise that the Worker refuses currency/math symbols. Verified false for the WHATWG URL path the Worker actually uses — Node domainToASCII (this run and #8428's):
So the container suite failed on clean main (the #659 A-label expectation) while an older #588 test pinned Sc refusals: the two validator copies disagreed in both directions.
Change
In _judge_idna_label (pkgs/lab-ops-hub/container/app.py): the blanket P/S/Z refusal becomes P/Z plus Sk; Co/Cs refusal and the CONTEXTO exception list are unchanged. So/Sc/Sm are accepted. The code comment records the parity rationale, including why this is not an SSRF weakening: these labels resolve through ordinary public DNS to the same A-label form the Worker certifies, and the private/loopback/link-local refusals live in the address checks, not this category rule.
Tests: the two Sc cases in test_a_label_must_be_its_uts46_mapped_form_and_disallowed_free move to accepted controls with the reason recorded; new test_symbol_hosts_match_whatwg_parity pins the Node-verified battery in raw and A-label forms (accept So/Sc/Sm; refuse Sk raw and decoded, and Po A-labels).
Verification
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.