Title: lab-ops-hub: container validator's #577 backslash normalization overreaches into query and fragment — WHATWG keeps \ as data there, so ?q=a\b is fetched as ?q=a/b · Issue #620 · developing-today/code · GitHub
Open Graph Title: lab-ops-hub: container validator's #577 backslash normalization overreaches into query and fragment — WHATWG keeps \ as data there, so ?q=a\b is fetched as ?q=a/b · Issue #620 · developing-today/code
X Title: lab-ops-hub: container validator's #577 backslash normalization overreaches into query and fragment — WHATWG keeps \ as data there, so ?q=a\b is fetched as ?q=a/b · Issue #620 · developing-today/code
Description: Summary The container validator's backslash normalization (#577, pkgs/lab-ops-hub/container/app.py in validate_crawl_url) replaces every \ in the whole input with / for http/https URLs. WHATWG treats a backslash as a path delimiter only ...
Open Graph Description: Summary The container validator's backslash normalization (#577, pkgs/lab-ops-hub/container/app.py in validate_crawl_url) replaces every \ in the whole input with / for http/https URLs. WHATWG trea...
X Description: Summary The container validator's backslash normalization (#577, pkgs/lab-ops-hub/container/app.py in validate_crawl_url) replaces every \ in the whole input with / for http/https URLs. WHATWG ...
Opengraph URL: https://github.com/developing-today/code/issues/620
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"lab-ops-hub: container validator's #577 backslash normalization overreaches into query and fragment — WHATWG keeps \\ as data there, so ?q=a\\b is fetched as ?q=a/b","articleBody":"## Summary\n\nThe container validator's backslash normalization (#577, `pkgs/lab-ops-hub/container/app.py` in `validate_crawl_url`) replaces **every** `\\` in the whole input with `/` for http/https URLs. WHATWG treats a backslash as a path delimiter only in the scheme/authority/path portion of a special-scheme URL — in the **query** and **fragment** it is ordinary data and is kept verbatim. The container therefore judges and returns a different URL than the Worker for any spelling with a backslash after the `?` or `#`.\n\n## Evidence (verified 2026-10-22, current main)\n\n`validate_crawl_url` (Python) vs `new URL(...).toString()` (the Worker's serializer):\n\n| Input | Container returns | Worker returns |\n|---|---|---|\n| `http://example.com/?q=a\\b` | `http://example.com/?q=a/b` | `http://example.com/?q=a\\b` |\n| `http://example.com/#a\\b` | `http://example.com/#a/b` | `http://example.com/#a\\b` |\n| `https://example.com/?q=a\\b\\c#x\\y` | `https://example.com/?q=a/b/c#x/y` | `https://example.com/?q=a\\b\\c#x\\y` |\n| `http://example.com/a\\b` | `http://example.com/a/b` | `http://example.com/a/b` (path arm agrees — control) |\n\nFound by the 470-case ASCII differential run for #618; this was the only remaining returned-URL mismatch class outside structural-delimiter spellings.\n\n## Why it matters\n\n- The query is sent to the origin: `?q=a\\b` and `?q=a/b` are different queries and can name different resources (search terms, signed parameters, Windows-style path parameters). The container crawls a URL the Worker would not, for a target both validators accepted — the same judged-vs-fetched divergence class as #577 itself, in the opposite direction: #577's fix overreaches past the components where the backslash is structural.\n- The fragment arm changes the returned/recorded URL identity even though fragments are not fetched.\n\n## Acceptance criteria\n\n- The `\\` → `/` replacement applies only up to the first `?` or `#` (the scheme/authority/path portion); backslashes in the query and fragment pass through verbatim, matching the Worker byte-for-byte.\n- The #577 authority spellings still normalize and are still judged on the normalized host (`http://127.0.0.1\\@example.com/` refused as loopback, `http://example.com\\@127.0.0.1/` judged as example.com), and the existing backslash tests pass unchanged.\n- New tests pin the query and fragment spellings in the table above.\n- Python suite (`test_container_validate.py`) and TS suite (`lib.test.ts`) both green.\n\n## Suggested fix\n\nSplit the input at the first `?`/`#` before the replacement and rejoin afterwards — or scope the existing `raw.replace(\"\\\\\", \"/\")` to the head segment — taking care that a `\\` inside the authority is still replaced even when a `?` appears later in the same spelling (it does: the head segment includes the full authority and path).\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-23T00:23:47Z","url":"https://github.com/developing-today/code/issues/620"}
| 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:5b4a2c90-28ac-e4a4-e803-a001c1664fca |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B22C:2D919D:1F92B8F:29AB49A:6B06921D |
| html-safe-nonce | b515b825c3d4daec548b1dc2abd2aa6f77981721ff22e6e120864877a6b8f8e4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjJDOjJEOTE5RDoxRjkyQjhGOjI5QUI0OUE6NkIwNjkyMUQiLCJ2aXNpdG9yX2lkIjoiNDE2NTU0NjYzMTY1MzM5NzAyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 84b08f20da9ffe70f38c31ea375ff503923087eccfb50be0ca2870b64503b98e |
| hovercard-subject-tag | issue:5989643764 |
| 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/620/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b1cd312af82a0911dc425db1fbdf8409b619cab660baada4c0b99538253dd0dc/developing-today/code/issues/620 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b1cd312af82a0911dc425db1fbdf8409b619cab660baada4c0b99538253dd0dc/developing-today/code/issues/620 |
| og:image:alt | Summary The container validator's backslash normalization (#577, pkgs/lab-ops-hub/container/app.py in validate_crawl_url) replaces every \ in the whole input with / for http/https URLs. WHATWG trea... |
| 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 | 4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a |
| 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 | 6d3909414814ff86ce7da4c51a0f4918a13fb41b |
| 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