GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||
GeezerVison is showing github.com — lab-ops-hub: container validator accepts IDNA-invalid hosts the Worker refuses — unassigned codepoints and bidi-violating mixed labels · Issue #583 · developing-today/code Closed DescriptionSummaryThe container crawl validator (
The Worker side needs no code to reject these: Evidence (verified 2026-10-22 on main
|
| URL | container validate_crawl_url |
Worker validateCrawlUrl / new URL |
|---|---|---|
http://exאample.com/ (Latin + Hebrew alef in one label) |
accepts, returns URL unchanged | rejects — new URL throws |
http://ample.com/ (U+0378, unassigned) |
accepts | rejects — new URL throws |
http://localאhost/ |
accepts | rejects — new URL throws |
http://אא.com/ (pure RTL label, control) |
accepts | accepts (xn--4dba.com) — validators agree |
Root cause, container/app.py:
validate_crawl_url (line 62) never performs an IDNA validity check on the mapped host. Its only IDNA-adjacent step is the length check at line 190, which measures "xn--" + label.encode("punycode") — raw punycode encoding succeeds for any string, valid IDN or not._IDNA_DISALLOWED frozenset (line 55, from lab-ops-hub: container validator still allows IDNA-disallowed Unicode hosts (space separators, bidi/format controls, U+FFFD) the Worker validator refuses #516: ~30 codepoints). A denylist cannot cover unassigned ranges (thousands of codepoints, growing/shrinking per Unicode version) or contextual rules like bidi, which are properties of the whole label, not of single codepoints."exאample".encode("idna") raises the bidi error (verified), but "\u0378".encode("idna") happily returns b"xn--zva" — the stdlib IDNA-2003 codec accepts unassigned codepoints that UTS-46 marks disallowed. Parity needs a check that matches WHATWG behaviour for both classes, not just a codec call.Consequences, same shapes this series has fixed before (#502, #507, #516):
validate_crawl_url refuses hosts whose labels are not valid UTS-46/IDNA domain labels — covering at minimum the unassigned-codepoint and bidi-violation classes above — with the same accept/refuse verdict as the Worker's validateCrawlUrl on a differential battery (the 26,040-host probe above, or an equivalent committed test corpus).münchen.de), and every currently-accepted public host in the existing suites stay accepted; CONTEXTJ handling stays as tracked separately in lab-ops-hub: container validator blanket-refuses CONTEXTJ-valid ZWNJ/ZWJ hosts (virama and Arabic-script joining contexts) the Worker validator accepts #531 (this issue is about spellings the Worker refuses).test/test_container_validate.py pin the headline cases (mixed LTR+RTL label refused, unassigned codepoint refused, pure RTL label accepted), and the TS suite gains the same cases if it does not already pin them.validate_crawl_url / _IDNA_DISALLOWED exist only in developing-today/code (grep across the opencode / openchamber / nix clones: no copies). Not an mcpx set.Merge pull request #590 from developing-today/sweep/583-idna-validity