Title: lab-ops-hub: container validator blanket-refuses percent-encoded hosts the Worker validator decodes and accepts — public spellings (%65xample.com, 8%2e8%2e8%2e8) diverge, including as redirect targets · Issue #529 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: container validator blanket-refuses percent-encoded hosts the Worker validator decodes and accepts — public spellings (example.com, 8.8.8.8) diverge, including as redirect targets · Issue #529 · developing-today/code
X Title: lab-ops-hub: container validator blanket-refuses percent-encoded hosts the Worker validator decodes and accepts — public spellings (example.com, 8.8.8.8) diverge, including as redirect targets · Issue #529 · developing-today/code
Description: Summary The two lab-ops-hub crawl validators disagree on percent-encoded hosts whose decoded form is public. The Worker validator (WHATWG URL) percent-decodes the host before judging it, so example.com, example.com and 8.8.8.8 ...
Open Graph Description: Summary The two lab-ops-hub crawl validators disagree on percent-encoded hosts whose decoded form is public. The Worker validator (WHATWG URL) percent-decodes the host before judging it, so examp...
X Description: Summary The two lab-ops-hub crawl validators disagree on percent-encoded hosts whose decoded form is public. The Worker validator (WHATWG URL) percent-decodes the host before judging it, so examp...
Opengraph URL: https://github.com/developing-today/code/issues/529
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: container validator blanket-refuses percent-encoded hosts the Worker validator decodes and accepts — public spellings (%65xample.com, 8%2e8%2e8%2e8) diverge, including as redirect targets","articleBody":"## Summary\n\nThe two lab-ops-hub crawl validators disagree on percent-encoded hosts whose decoded form is public. The Worker validator (WHATWG URL) percent-decodes the host before judging it, so `%65xample.com`, `example%2ecom` and `8%2e8%2e8%2e8` are accepted as the public hosts they decode to. The container validator refuses **every** host containing `%` (the blanket fail-closed rule added for #505), including those public spellings — and including them as redirect targets, which the container validates raw with no Worker normalisation in between.\n\n## Evidence (verified 2026-10-21 on main `b5757a66`, both validators run directly)\n\nWorker — `pkgs/lab-ops-hub/src/lib.ts:130` `validateCrawlUrl` (via Node's WHATWG `URL`):\n\n| input host | `u.hostname` | verdict |\n| --- | --- | --- |\n| `%65xample.com` | `example.com` | OK |\n| `example%2ecom` | `example.com` | OK |\n| `8%2e8%2e8%2e8` | `8.8.8.8` | OK |\n| `%6cocalhost` | `localhost` | refused (decoded form judged) |\n| `127%2e0%2e0%2e1` | `127.0.0.1` | refused |\n\nContainer — `pkgs/lab-ops-hub/container/app.py:114-116` (`if \"%\" in host: raise … refusing to crawl percent-encoded host`):\n\n| input host | verdict |\n| --- | --- |\n| `%65xample.com` | refused |\n| `example%2ecom` | refused |\n| `8%2e8%2e8%2e8` | refused |\n| `%38%2e8.8.8` | refused |\n| `%6cocalhost` | refused (correct outcome, via the blanket rule) |\n\n## Why it matters\n\n- The validators are meant to hold the same policy independently (lib.ts:12: \"The Python container crawler applies the same policy independently\"). Every other divergence in this series (#502, #504, #507, #510, #511, #513, #517, #519, #527) was treated as a bug to align, in whichever direction.\n- Direct `/api/crawl` submissions are masked by `src/index.ts:368` (`b.url = target.url` — the Worker dispatches the normalised URL), but redirect targets are not: `container/app.py:241-243` (`_ValidatingRedirectHandler.redirect_request`) validates the raw `Location` target, so a public page that 3xx-redirects to a percent-encoded public host crawls fine on the Worker-fallback path and 400s in the container, burning a container run and recording a spurious `containerError` before the fallback succeeds.\n- #505's blanket refusal was the right fail-closed stopgap for decoded-blocked hosts (`%6cocalhost`, `127.0.0.1%09`, IPv6 zone ids); the follow-up is to decode-and-judge like WHATWG instead of refusing the whole class.\n\n## Suggested fix / acceptance criteria\n\n- [ ] Container validator percent-decodes the host (valid `%XX` sequences, UTF-8) before the existing checks, mirroring WHATWG host parsing, instead of refusing on any `%`.\n- [ ] Decoded-blocked spellings stay refused: `%6cocalhost` → localhost, `127%2e0%2e0%2e1` → 127.0.0.1, `foo%2elocalhost` → foo.localhost, `127.0.0.1%09` (decodes to a forbidden tab character).\n- [ ] Invalid percent sequences (`%zz`, a trailing `%`) and IPv6 zone ids (`[fe80::1%25eth0]`) stay refused — WHATWG rejects both outright.\n- [ ] Decoded-public spellings are accepted in both validators: `%65xample.com`, `example%2ecom`, `8%2e8%2e8%2e8`, `%38%2e8.8.8`.\n- [ ] A parity test pins these cases in both suites (`test/lib.test.ts`, `test/test_container_validate.py`), including at least one as a redirect target.\n- [ ] Note: judging the decoded form is not the same as fetching the raw spelling — urllib does not percent-decode hosts — so the fix should make the container fetch the decoded/normalised host (as the Worker does via `target.url`), not merely accept the raw URL.\n\nSingle-repo: `validateCrawlUrl`/`validate_crawl_url` exist only in this repo (checked the opencode, openchamber and nix clones — no copies).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-22T04:00:47Z","url":"https://github.com/developing-today/code/issues/529"}
| 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:6704e581-82d2-1ee9-598d-d52892a64f60 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FCE:3D2C49:6D68E8:8E3C7E:6B0626F6 |
| html-safe-nonce | 4fda370ccd8429f1c3805cb6815569e2aec32ec1a4300ebbdba7eb8ece659ffc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkNFOjNEMkM0OTo2RDY4RTg6OEUzQzdFOjZCMDYyNkY2IiwidmlzaXRvcl9pZCI6IjY1MTA5NDg2NTYxOTAyMDM2MzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f153418e055d7ab446553f0b7fcd0b462fab5144a52fc6696919cfb73d8a1d85 |
| hovercard-subject-tag | issue:5972801902 |
| 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/529/issue_layout |
| twitter:image | https://opengraph.githubassets.com/965b20f4d40a489c6ab3fa771bd4bc6d1430731c911fc0abf46c1612ad1f22fc/developing-today/code/issues/529 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/965b20f4d40a489c6ab3fa771bd4bc6d1430731c911fc0abf46c1612ad1f22fc/developing-today/code/issues/529 |
| og:image:alt | Summary The two lab-ops-hub crawl validators disagree on percent-encoded hosts whose decoded form is public. The Worker validator (WHATWG URL) percent-decodes the host before judging it, so examp... |
| 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 | 9e10bb0ecc0bd0f8692aa89586ee9b54e498d7ab9f244a44cdb5b93653a125ce |
| 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 | 32e57d5cc2ce6ce92ec6dceb65858344750c27c2 |
| 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