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 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 Closed DescriptionSummaryThe 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 Evidence (verified 2026-10-21 on main
|
| input host | u.hostname |
verdict |
|---|---|---|
%65xample.com |
example.com |
OK |
example%2ecom |
example.com |
OK |
8%2e8%2e8%2e8 |
8.8.8.8 |
OK |
%6cocalhost |
localhost |
refused (decoded form judged) |
127%2e0%2e0%2e1 |
127.0.0.1 |
refused |
Container — pkgs/lab-ops-hub/container/app.py:114-116 (if "%" in host: raise … refusing to crawl percent-encoded host):
| input host | verdict |
|---|---|
%65xample.com |
refused |
example%2ecom |
refused |
8%2e8%2e8%2e8 |
refused |
%38%2e8.8.8 |
refused |
%6cocalhost |
refused (correct outcome, via the blanket rule) |
/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.%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.%XX sequences, UTF-8) before the existing checks, mirroring WHATWG host parsing, instead of refusing on any %.%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).%zz, a trailing %) and IPv6 zone ids ([fe80::1%25eth0]) stay refused — WHATWG rejects both outright.%65xample.com, example%2ecom, 8%2e8%2e8%2e8, %38%2e8.8.8.test/lib.test.ts, test/test_container_validate.py), including at least one as a redirect target.target.url), not merely accept the raw URL.Single-repo: validateCrawlUrl/validate_crawl_url exist only in this repo (checked the opencode, openchamber and nix clones — no copies).
Fix in PR #533 (branch sweep/529-percent-encoded-host, commit 00de5b87).
The container validator now percent-decodes the host before judging it (valid %XX escapes, UTF-8; invalid escapes, undecodable bytes, double-encoded spellings, decoded host delimiters and IPv6 zone ids refused at the decode step), runs the existing checks on the decoded form, and returns — and fetches — the URL with the decoded host substituted, in both the /crawl handler and the redirect handler.
Verified: reproduced the divergence on main a8a3bf7e first (all four public spellings refused by the container, accepted by the Worker); 52-host differential probe against the Worker's validateCrawlUrl shows full verdict parity post-fix; npm test TS 25/25 + Python 22/22 with new parity tests in both suites (incl. a redirect target in each); ablation fails the new acceptance/redirect tests with only app.py reverted.
Merge pull request #533 from developing-today/sweep/529-percent-encod…