Title: lab-ops-hub: container validator resolves a trailing '..;' / '.;' segment as a dot segment — bare-semicolon params tail is lost, returned path differs from the Worker · Issue #655 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: container validator resolves a trailing '..;' / '.;' segment as a dot segment — bare-semicolon params tail is lost, returned path differs from the Worker · Issue #655 · developing-today/code
X Title: lab-ops-hub: container validator resolves a trailing '..;' / '.;' segment as a dot segment — bare-semicolon params tail is lost, returned path differs from the Worker · Issue #655 · developing-today/code
Description: Summary The container validator (pkgs/lab-ops-hub/container/app.py) resolves a trailing dot segment followed by a bare semicolon (..;, .;, .;, ..;) as if it were a plain dot segment, and returns a different path than the Worker ret...
Open Graph Description: Summary The container validator (pkgs/lab-ops-hub/container/app.py) resolves a trailing dot segment followed by a bare semicolon (..;, .;, .;, ..;) as if it were a plain dot segment, and retu...
X Description: Summary The container validator (pkgs/lab-ops-hub/container/app.py) resolves a trailing dot segment followed by a bare semicolon (..;, .;, .;, ..;) as if it were a plain dot segment, and retu...
Opengraph URL: https://github.com/developing-today/code/issues/655
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: container validator resolves a trailing '..;' / '.;' segment as a dot segment — bare-semicolon params tail is lost, returned path differs from the Worker","articleBody":"## Summary\n\nThe container validator (`pkgs/lab-ops-hub/container/app.py`) resolves a trailing dot segment followed by a **bare semicolon** (`..;`, `.;`, `%2e;`, `%2e%2e;`) as if it were a plain dot segment, and returns a different path than the Worker returns for the same target. WHATWG treats `..;` as an ordinary path segment (the semicolon is data), so the Worker keeps it; the container drops the segment entirely (and, for `..;`, pops the previous segment too), so the two crawlers record — and fetch — different URLs.\n\n## Evidence (verified on main `3ac2e9ee`, driving the real Python validator vs Node's WHATWG `URL`)\n\n| Input | Container returns | Worker (WHATWG) returns |\n|---|---|---|\n| `http://example.com/..;` | `http://example.com/` | `http://example.com/..;` |\n| `http://example.com/.;` | `http://example.com/` | `http://example.com/.;` |\n| `http://example.com/foo/..;` | `http://example.com/` | `http://example.com/foo/..;` |\n| `http://example.com/a/.;` | `http://example.com/a/` | `http://example.com/a/.;` |\n| `http://example.com/a/b/..;` | `http://example.com/a/` | `http://example.com/a/b/..;` |\n| `http://example.com/%2e;` | `http://example.com/` | `http://example.com/%2e;` |\n| `http://example.com/%2e%2e;` | `http://example.com/` | `http://example.com/%2e%2e;` |\n| `http://example.com/..;?q` | `http://example.com/?q` | `http://example.com/..;?q` |\n\nControls that already agree (non-empty params are handled): `http://example.com/..;foo`, `http://example.com/foo/.;x`, `http://example.com/a/..;foo` all return unchanged in both.\n\n## Root cause\n\n`urlparse` splits the last path segment at the first `;` into `path` + `params`. For a bare trailing `;` the params are the **empty string**:\n\n```\nurlparse(\"http://example.com/..;\") -> path=\"/..\", params=\"\"\nurlparse(\"http://example.com/..;foo\") -> path=\"/..\", params=\"foo\"\n```\n\n- `_normalize_validated_url` (app.py:849) rejoins only when params is truthy: `full_path = u.path + (f\";{u.params}\" if u.params else \"\")` — so the `;` is lost exactly when params is empty, and `_resolve_dot_segments` then treats the rejoined `/..` / `/.` / `/%2e` as a dot segment. The comment at app.py:816-820 documents the rejoin intent (\"a trailing `..;foo` is data, not a double-dot segment\") but the empty-params arm defeats it. The existing tests at app.py:979-980 / the test suite cover only `..;foo` spellings.\n- `_url_with_encoded_components` (app.py:~942) has the same loss independently: it rebuilds from `u.path` + `u.params`, so even a correctly normalized `/..;` would come back as `/..`.\n\n## Why it matters\n\nThe URL `validate_crawl_url` returns is the URL the fetcher fetches. A target whose last segment is `..;` / `.;` (a legitimate, if unusual, path spelling) is fetched by the container at the collapsed path — a different resource than the Worker fetches and than was judged — the same returned-form divergence class as #633/#639, in the one params arm those fixes missed.\n\n## Acceptance criteria\n\n- `validate_crawl_url` returns the WHATWG form for the table above (segments `..;`, `.;`, `%2e;`, `%2e%2e;` preserved verbatim, including before `?`/`#`).\n- The fix covers both rebuild sites (`_normalize_validated_url` and `_url_with_encoded_components`); one clean way is to take the full path (including the `;params` tail) from `urlsplit`, which never splits params, instead of rejoining `urlparse`'s split.\n- New regression tests in `pkgs/lab-ops-hub/test/test_container_validate.py` pin the bare-`;` spellings alongside the existing `..;foo` controls; existing suite stays green.\n- No change to acceptance/refusal verdicts — returned form only.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-23T06:38:02Z","url":"https://github.com/developing-today/code/issues/655"}
| 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:38733e76-d3c8-fe72-9791-db1bdc251ac0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E25C:572F9:6D48B8:92808D:6B062CFD |
| html-safe-nonce | d9ba8074e78121f74c13e09279185f99b15d172ace03d346040fcb3ded46cef8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjVDOjU3MkY5OjZENDhCODo5MjgwOEQ6NkIwNjJDRkQiLCJ2aXNpdG9yX2lkIjoiNTQyNjMzODI4NDMwMzY5MTAwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3676d56c1b3de2556d9117f83b8d8d069ec0be23fb78715324bb1d173bb02874 |
| hovercard-subject-tag | issue:5993185823 |
| 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/655/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c99500d791fd71d4da78185a093bf4403f41e85f86a6aff1fc8ecd2240f4ac85/developing-today/code/issues/655 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c99500d791fd71d4da78185a093bf4403f41e85f86a6aff1fc8ecd2240f4ac85/developing-today/code/issues/655 |
| og:image:alt | Summary The container validator (pkgs/lab-ops-hub/container/app.py) resolves a trailing dot segment followed by a bare semicolon (..;, .;, .;, ..;) as if it were a plain dot segment, and retu... |
| 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