Title: lab-ops-hub: container validator drops the DNS root dot only for the percent-encoded spelling — returned URL differs from the Worker and from its own literal-dot form · Issue #647 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: container validator drops the DNS root dot only for the percent-encoded spelling — returned URL differs from the Worker and from its own literal-dot form · Issue #647 · developing-today/code
X Title: lab-ops-hub: container validator drops the DNS root dot only for the percent-encoded spelling — returned URL differs from the Worker and from its own literal-dot form · Issue #647 · developing-today/code
Description: Finding For a host with a trailing DNS root dot, the container validator returns a different URL depending on how the dot was spelled, and the percent-encoded spelling disagrees with the Worker validator: Input Container returns Worker r...
Open Graph Description: Finding For a host with a trailing DNS root dot, the container validator returns a different URL depending on how the dot was spelled, and the percent-encoded spelling disagrees with the Worker val...
X Description: Finding For a host with a trailing DNS root dot, the container validator returns a different URL depending on how the dot was spelled, and the percent-encoded spelling disagrees with the Worker val...
Opengraph URL: https://github.com/developing-today/code/issues/647
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: container validator drops the DNS root dot only for the percent-encoded spelling — returned URL differs from the Worker and from its own literal-dot form","articleBody":"## Finding\n\nFor a host with a trailing DNS root dot, the container validator returns a different URL depending on how the dot was spelled, and the percent-encoded spelling disagrees with the Worker validator:\n\n| Input | Container returns | Worker returns |\n|---|---|---|\n| `http://example.com./` | `http://example.com./` | `http://example.com./` |\n| `http://example.com./path` | `http://example.com./path` | `http://example.com./path` |\n| `http://example.com%2e/` | `http://example.com/` | `http://example.com./` |\n| `http://example.com%2E/` | `http://example.com/` | `http://example.com./` |\n| `http://sub.example.com%2e/` | `http://sub.example.com/` | `http://sub.example.com./` |\n| `http://example.com%2e/path` | `http://example.com/path` | `http://example.com./path` |\n\nVerified this run on current main (e810ca8d), driving both real validators: Python `validate_crawl_url` (`pkgs/lab-ops-hub/container/app.py`) and the Worker `validateCrawlUrl` (`pkgs/lab-ops-hub/src/lib.ts`) under Bun. Acceptance agrees everywhere probed (both refuse `http://localhost%2e/`, both accept the public forms) — only the returned/recorded form diverges.\n\n## Root cause\n\n`container/app.py:250-251` strips a single trailing root dot from the judged host (`host = host[:-1]`, #466) — correct for judging. But the percent-decoded return path (`container/app.py`, the `_url_with_host(u, host) if percent_decoded else raw` call in `validate_crawl_url`, ~line 402) rebuilds the returned URL from that stripped host, so the dot is lost. The literal-dot spelling takes the `raw` path and keeps its dot. The Worker strips the dot only for its checks (`src/lib.ts:145-146`) but returns `u.toString()`, and WHATWG host parsing decodes `%2e` to `.` and serialises the root dot back — so the Worker returns the dotted form for both spellings.\n\n## Why it matters\n\nThe validated URL is the crawl record and the fetched URL: the same target is recorded as `http://example.com/` by the container (percent-encoded input) but `http://example.com./` by the Worker and by the container itself (literal input), defeating cross-crawler dedup/comparison for root-dot spellings — the same class of divergence #633/#639 addressed for dot segments, ports and empty components. (Fetching is unaffected in practice: a root-dot host resolves identically.)\n\n## Acceptance criteria\n\n- One canonical returned form for the root-dot host, identical for the literal and percent-encoded spellings and matching the Worker (or the Worker changed too, with the decision recorded — the two validators must agree).\n- A differential test against the Worker validator covers `example.com.`, `example.com%2e`, `example.com%2E` and a subdomain form, with and without a path.\n- No change to which targets are accepted or refused (`localhost%2e` stays refused, `example.com..` stays refused); existing container and Worker validator tests stay green.\n\n## Suggested fix\n\nIn the percent-decoded return path, re-attach the root dot that judging stripped (track whether the decoded host ended in `.` before the strip at app.py:250 and append it to the host passed to `_url_with_host`), or record the pre-strip decoded host for the return form while judging the stripped one.","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-23T04:58:28Z","url":"https://github.com/developing-today/code/issues/647"}
| 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:350bf395-dc54-61a2-52a7-dacf44a8a462 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E7EA:38A9D8:A0D57C:D5F6C5:6B063CE5 |
| html-safe-nonce | 7bb0e14c33e6dd55713e259a8a604e702e843d455563a9b890b7257a0d716783 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0VBOjM4QTlEODpBMEQ1N0M6RDVGNkM1OjZCMDYzQ0U1IiwidmlzaXRvcl9pZCI6IjQwMTg4OTYxOTMxMDIxNjcyNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ff9710fb3094259be5bf491674582d058a5096e8a886c2e8d38c592020680cb9 |
| hovercard-subject-tag | issue:5992162798 |
| 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/647/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c3d7c9e689db9866a408067e44ef0ec01a565e4fcdac4a20c52b0afb5ce5e69f/developing-today/code/issues/647 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c3d7c9e689db9866a408067e44ef0ec01a565e4fcdac4a20c52b0afb5ce5e69f/developing-today/code/issues/647 |
| og:image:alt | Finding For a host with a trailing DNS root dot, the container validator returns a different URL depending on how the dot was spelled, and the percent-encoded spelling disagrees with the Worker val... |
| 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 | dcf72c457c022486d23c3cbb0dd21aba537a87611ca9ddabd1799cf2eaa9b297 |
| 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 | 0f38f5735226749ec5e08a8649dce4cb2613d9ad |
| 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