Title: lab-ops-hub: container validator still allows DEL/C1-control, NBSP and WHATWG-forbidden (<>^|) hosts the Worker validator refuses · Issue #510 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: container validator still allows DEL/C1-control, NBSP and WHATWG-forbidden (<>^|) hosts the Worker validator refuses · Issue #510 · developing-today/code
X Title: lab-ops-hub: container validator still allows DEL/C1-control, NBSP and WHATWG-forbidden (<>^|) hosts the Worker validator refuses · Issue #510 · developing-today/code
Description: Summary PR #508 (fix for #507) added a whitespace check to the lab-ops-hub container crawler's validate_crawl_url (pkgs/lab-ops-hub/container/app.py:63 on main d4809cff): if any(ord(c) <= 0x20 for c in host): raise ValueError(f"refusing ...
Open Graph Description: Summary PR #508 (fix for #507) added a whitespace check to the lab-ops-hub container crawler's validate_crawl_url (pkgs/lab-ops-hub/container/app.py:63 on main d4809cff): if any(ord(c) <= 0x20 for ...
X Description: Summary PR #508 (fix for #507) added a whitespace check to the lab-ops-hub container crawler's validate_crawl_url (pkgs/lab-ops-hub/container/app.py:63 on main d4809cff): if any(ord(c) <= 0x...
Opengraph URL: https://github.com/developing-today/code/issues/510
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: container validator still allows DEL/C1-control, NBSP and WHATWG-forbidden (\u003c>^|) hosts the Worker validator refuses","articleBody":"## Summary\n\nPR #508 (fix for #507) added a whitespace check to the lab-ops-hub container crawler's `validate_crawl_url` (`pkgs/lab-ops-hub/container/app.py:63` on main `d4809cff`):\n\n```python\nif any(ord(c) \u003c= 0x20 for c in host):\n raise ValueError(f\"refusing to crawl host with whitespace {host!r}\")\n```\n\nIts comment says \"A space or control character in the host is not a DNS name\", but `ord(c) \u003c= 0x20` covers only the C0 controls + space. The remaining control characters and the rest of the WHATWG forbidden-host set still fall through and are certified as \"a public DNS name\", while the Worker's `validateCrawlUrl` (`pkgs/lab-ops-hub/src/lib.ts:129`) refuses every one of them outright:\n\n| Host form | TS Worker | Python container |\n| --- | --- | --- |\n| `http://exam\\x7fple.com/` (DEL) | BLOCK (\"url is not a valid URL\") | **ALLOW** |\n| `http://exam\\x80ple.com/` … `\\x9f` (C1 controls) | BLOCK | **ALLOW** |\n| `http://exam\\xa0ple.com/` (NBSP) | BLOCK | **ALLOW** |\n| `http://exam\u003cple.com/`, `exam>ple`, `exam^ple`, `exam\\|ple` | BLOCK | **ALLOW** |\n\nControls, identical on both sides (must not change): ordinary DNS names, `http://exam_ple.com/`, and valid IDN hosts (e.g. `examéple.com`) are ALLOW/ALLOW — so the fix must not blanket-ban non-ASCII.\n\n## Evidence\n\n- PR: https://github.com/developing-today/code/pull/508, commit `ebbeb8bca08895de704c720526b7842235590249`, merged as `d4809cffa77d9fb4695262445802a197ab1b6b4e`.\n- Verified on current main `d4809cff` (git `origin/main` and `gh api` agree) by driving both real validators over the same battery: every printable ASCII character plus 0x7F–0xA0, é and a combining char, each embedded as `http://exam\u003cchar>ple.com/` (TS via bun importing `src/lib.ts`, Python by importing `container/app.py`). The complete set of divergences was exactly: `\u003c`, `>`, `^`, `|`, 0x7F, 0x80–0x9F, 0xA0.\n- The DEL case reproduces #507's exact lazy-failure shape: Python's own fetcher rejects it deep inside `http.client`, whose disallowed-character check is `[\\\\x00-\\\\x20\\\\x7f]` — i.e. `http.client.HTTPConnection(\"exam\\\\x7fple.com\").putrequest(...)` raises `InvalidURL: URL can't contain control characters` — but the validator's new check stops one codepoint short of the fetcher's own set. The `\u003c > ^ |` hosts are WHATWG forbidden host codepoints; no DNS resolver accepts them either, so those crawls also die below the validator instead of at it.\n\n## Why it matters\n\nThe container validator is the defence-in-depth re-check on the component that actually fetches (#441), and the parity premise of #468/#502/#505/#507 is that where the two validators disagree, the effective policy is the weaker one. PR #508 closed the space/C0 part of this class but left the validator's stated rule (\"space or control character\") under-implemented: a whole tail of not-a-DNS-name hosts is still certified as public DNS names, pushing the failure into the fetcher/resolver as a low-level error and leaving the guard's verdict meaningless for them.\n\nCross-repo note: this validator pair lives only in developing-today/code (`git grep` for `validateCrawlUrl`/`validate_crawl_url` in the opencode, openchamber and dezren39/nix clones finds no twin), so this is a single-repo issue.\n\n## Acceptance criteria\n\n- `validate_crawl_url` refuses a host containing DEL (0x7F), a C1 control (0x80–0x9F), NBSP (0xA0), or any of `\u003c > ^ |`, up front with a clear validator error.\n- Controls unchanged: ordinary DNS names, `exam_ple.com`, valid IDN hosts, valid IPv6 literals and public targets are still accepted on both sides.\n- A regression test in `pkgs/lab-ops-hub/test/test_container_validate.py` covers each refused class, and fails with only `container/app.py` reverted (ablation).\n- The Python and TS validators agree on the full character battery above.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-21T22:04:52Z","url":"https://github.com/developing-today/code/issues/510"}
| 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:495a4fe0-bfd7-a793-173b-36a7a6a90716 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BACA:130DD7:739207:99FC3C:6B062C72 |
| html-safe-nonce | 9e146e2288a10eae5be9256dcd8214629cf25a3ea52e27b009f2702c4905c739 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQUNBOjEzMERENzo3MzkyMDc6OTlGQzNDOjZCMDYyQzcyIiwidmlzaXRvcl9pZCI6IjMxNjYxODU5OTYxNzgzMDQxMTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 81d8d1eadf56758e1055e253920c0cb1d6b4dd378e2b82f678112d691d91f83c |
| hovercard-subject-tag | issue:5969284928 |
| 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/510/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6052764ff6827334c00f2e9461257e73b5f127290c03eab7aedba13e5205bf8f/developing-today/code/issues/510 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6052764ff6827334c00f2e9461257e73b5f127290c03eab7aedba13e5205bf8f/developing-today/code/issues/510 |
| og:image:alt | Summary PR #508 (fix for #507) added a whitespace check to the lab-ops-hub container crawler's validate_crawl_url (pkgs/lab-ops-hub/container/app.py:63 on main d4809cff): if any(ord(c) <= 0x20 for ... |
| 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 | 7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3 |
| 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 | 494ea0bb1e0feef734a83e2628697647755e8864 |
| 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