Title: lab-ops-hub: PR #584's A-label check still accepts decoded labels that are not valid UTS-46 labels — mapped/compatibility characters, IDNA-disallowed symbols, leading combining marks · Issue #588 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: PR #584's A-label check still accepts decoded labels that are not valid UTS-46 labels — mapped/compatibility characters, IDNA-disallowed symbols, leading combining marks · Issue #588 · developing-today/code
X Title: lab-ops-hub: PR #584's A-label check still accepts decoded labels that are not valid UTS-46 labels — mapped/compatibility characters, IDNA-disallowed symbols, leading combining marks · Issue #588 · developing-today/code
Description: Summary PR #584 (fixes #580, commit 24566d9f, merged as 22a4b98f) added _judge_a_label to the container crawl validator (pkgs/lab-ops-hub/container/app.py:325, called from validate_crawl_url at :213) so an xn-- (A-label) host is judged b...
Open Graph Description: Summary PR #584 (fixes #580, commit 24566d9f, merged as 22a4b98f) added _judge_a_label to the container crawl validator (pkgs/lab-ops-hub/container/app.py:325, called from validate_crawl_url at :21...
X Description: Summary PR #584 (fixes #580, commit 24566d9f, merged as 22a4b98f) added _judge_a_label to the container crawl validator (pkgs/lab-ops-hub/container/app.py:325, called from validate_crawl_url at :21...
Opengraph URL: https://github.com/developing-today/code/issues/588
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: PR #584's A-label check still accepts decoded labels that are not valid UTS-46 labels — mapped/compatibility characters, IDNA-disallowed symbols, leading combining marks","articleBody":"## Summary\n\nPR #584 (fixes #580, commit `24566d9f`, merged as `22a4b98f`) added `_judge_a_label` to the container crawl validator (`pkgs/lab-ops-hub/container/app.py:325`, called from `validate_crawl_url` at :213) so an `xn--` (A-label) host is judged by its punycode-decoded label. It checks: the label decodes, is non-empty/non-ASCII, re-encodes to exactly the same punycode (:351), carries no character in the validator's enumerated forbidden set, contains no unassigned (Cn) or format (Cf) codepoint, and passes `decoded.encode(\"idna\")` (:383).\n\nThat still does not hold the decoded label to the UTS-46 validity the Worker's WHATWG parser applies, so whole classes of A-label spellings are certified by the container as ordinary public DNS names while the Worker's `validateCrawlUrl` (`pkgs/lab-ops-hub/src/lib.ts`) refuses them outright (`new URL` throws):\n\n1. **Decoded labels that are not the canonical (mapped) form of anything.** UTS-46 processing maps uppercase, fullwidth and compatibility characters before punycode; a decoded label still containing one was never the encoding of a valid U-label. Examples: a decoded label containing `À` (maps to `à`), `²` (NFKC → `2`), U+FF0F `/` (NFKC → `/`, a host delimiter), U+3002 `。` (a label separator), or U+2000 (NFKC → space). The container's own raw-form path refuses or transforms every one of these (the mapped-delimiter re-check and the forbidden-character check in `validate_crawl_url`); the A-label path bypasses them because mapping was applied to the ASCII spelling, before decoding.\n2. **IDNA-disallowed characters the stdlib IDNA-2003 codec passes.** Symbols and punctuation that IDNA2008/UTS-46 mark DISALLOWED (e.g. U+00A8 `¨`, U+00B4 `´`, U+037E, currency/math symbols) encode happily with `decoded.encode(\"idna\")`, so the :383 check does not catch them.\n3. **Labels beginning with a combining mark.** UTS-46/IDNA requires a label not to start with a non-spacing mark; `\"\\u0301abcé\".encode(\"idna\")` succeeds, so an A-label decoding to such a label passes.\n\n## Evidence (verified 2026-10-22 on current main `22a4b98f`, the merge commit of PR #584 itself)\n\nHeadline cases — Python `validate_crawl_url` imported from `container/app.py` at main, TS `validateCrawlUrl` imported from `src/lib.ts` under Bun (the same differential method as #583):\n\n| URL (A-label host) | Decoded label | Container | Worker |\n|---|---|---|---|\n| `http://xn--abc-dma09x.com/` | `\\u0301abcé` (starts with combining acute) | **accepts** | refuses — `url is not a valid URL` |\n| `http://xn--mnchende-65a9941j.com/` | `münchen。de` (contains U+3002) | **accepts** | refuses |\n| `http://xn--ab-cja0631x.com/` | `a/bé` (contains U+FF0F) | **accepts** | refuses |\n| `http://xn--mnchen-3ya5364d.com/` | `mün\\u2000chen` (contains U+2000) | **accepts** | refuses |\n| `http://xn--example-yoa.com/` | `exÀample` (uppercase in decoded label) | **accepts** | refuses |\n| `http://xn--example-rla.com/` | `ex²ample` (compatibility digit) | **accepts** | refuses |\n| `http://xn--mnchen-3ya.de/`, `http://xn--bcher-kva.de/`, `http://xn--fsq.com/` | `münchen`, `bücher`, `例` (controls, PR #584's own accepted set) | accepts | accepts |\n\nDifferential battery: 13,040 A-label hosts — every codepoint U+0080–U+32FF inserted into `ex\u003ccp>ample` and punycode-encoded, plus labels beginning with U+0300–U+036F — run through both real validators: **2,449 divergences, all container-accepts / Worker-refuses** (by category of the inserted codepoint: Lu 866, So 512, Lo 355, No 155, Lm 140, Mn 139 incl. 112 leading-mark labels, Ll 94, Zs 14, plus smaller Po/Nl/Lt/Sk/Sm/Nd/Sc/Ps/Pe/Pd pockets). One smaller reverse pocket exists: **41 container-refuses / Worker-accepts**, all codepoints this Python's `unicodedata` 15.0.0 still classes Cn that Bun's newer Unicode has assigned — a Unicode-version skew in PR #584's new Cn check, noted here so the fix does not bake the skew in deeper.\n\nRoot cause: the canonical check at :351 compares raw punycode only (`decoded.encode(\"punycode\") != body`) — punycode round-trips *any* string, valid U-label or not — and the validity check at :383 is the stdlib IDNA-2003 codec, which applies neither UTS-46 mapping/canonical-form verification nor the IDNA2008 disallowed/leading-mark rules. PR #584's battery (25 A-label hosts) only exercised the Arabic-Indic, malformed-punycode and ordinary-IDN classes it set out to fix, so the residual classes were untested.\n\nRelation to existing issues: #583 tracks the same *kind* of gap for **raw-form** hosts (unassigned + bidi classes; its battery and acceptance corpus are raw spellings, and a raw-form fix that never decodes A-labels leaves this issue's spellings untouched). PR #584 already treated the A-label form of #583's bidi/unassigned classes as this validator's separate A-label work; this issue is the remaining A-label residue after that fix. Coordinate with #583 — one shared UTS-46 validity helper applied to the decoded label would close both. #531 is the opposite direction (raw-form over-refusal) and is unaffected.\n\n## Why it matters\n\nSame shape as #502/#507/#516/#574/#580: the two validators that are supposed to hold the same crawl-target policy (#441 defence in depth — the container is the component that actually fetches, re-validating independently) disagree on thousands of spellings. The container certifies a non-name as a public DNS name; the failure then surfaces deep inside the fetcher/resolver as a crawl failure instead of the validator's up-front refusal, and behaviour depends on which crawler runs.\n\n## Acceptance criteria\n\n- `validate_crawl_url` refuses an A-label whose decoded label is not a valid UTS-46 label: decoded form differs from its UTS-46 mapped/NFC form, contains an IDNA-disallowed codepoint, or begins with a combining mark — with the same accept/refuse verdict as the Worker's `validateCrawlUrl` on a differential battery over A-label hosts (the 13,040-host probe above, or an equivalent committed corpus).\n- PR #584's pinned behaviour is unchanged: the Arabic-Indic A-label spellings and malformed A-labels stay refused; its accepted controls (`xn--mnchen-3ya`, `xn--bcher-kva`, `xn--fsq`, the Devanagari-digit A-label) stay accepted.\n- New tests in `pkgs/lab-ops-hub/test/test_container_validate.py` pin the headline cases above (leading combining mark, U+3002/U+FF0F/U+2000 in decoded label, uppercase decoded label — refused; ordinary IDN A-labels — accepted).\n- The 41-case reverse pocket is either closed (Cn judged against a Unicode version at least as new as the Worker's runtime) or explicitly documented as a known version-skew over-refusal.\n- No regression in the existing Python or TS suites.\n\nSingle-repo: `validate_crawl_url` / `_judge_a_label` exist only in `developing-today/code` (the lab-ops-hub validator has no copy in opencode / openchamber / nix). Not an mcpx set.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-22T12:42:51Z","url":"https://github.com/developing-today/code/issues/588"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6a8f30b0-7176-111e-cbd6-6ed3c3bcfe77 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E06:33943:9B7B93:C943B7:6B063397 |
| html-safe-nonce | 8430203d445146fa2dca54d751b836b6fac513bdc932b5c33c49d87433f111da |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTA2OjMzOTQzOjlCN0I5MzpDOTQzQjc6NkIwNjMzOTciLCJ2aXNpdG9yX2lkIjoiODM0NjU2NTAxMzYxMTYyMzMxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b09f193dd2447319faa21a968ba8fdd614e656fda5d1f18ae25a436965c8ffc0 |
| hovercard-subject-tag | issue:5979517203 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/588/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b43c4d6464c64f31b39c81f9281aa9acb614ebfe5f3f9c879d516c1d3654a4ac/developing-today/code/issues/588 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b43c4d6464c64f31b39c81f9281aa9acb614ebfe5f3f9c879d516c1d3654a4ac/developing-today/code/issues/588 |
| og:image:alt | Summary PR #584 (fixes #580, commit 24566d9f, merged as 22a4b98f) added _judge_a_label to the container crawl validator (pkgs/lab-ops-hub/container/app.py:325, called from validate_crawl_url at :21... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9eb3bb1597d09170a5f282cd38ae376dee1a5ec1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width