GeezerVison is showing github.com — lab-ops-hub: container validator returns WHATWG-encodable ASCII punctuation verbatim outside the host — path/query/fragment/userinfo " < > ^ ` { } go on the request line raw while the Worker fetches the encoded form · Issue #618 · developing-today/code
lab-ops-hub: container validator returns WHATWG-encodable ASCII punctuation verbatim outside the host — path/query/fragment/userinfo " < > ^ ` { } go on the request line raw while the Worker fetches the encoded form #618Labels app/lab-ops-hubPackage/app: lab-ops-hub (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label) DescriptionSummary
The container validator's returned-URL encoder (_encode_url_component, pkgs/lab-ops-hub/container/app.py:663) claims in its comment to encode "the way WHATWG's URL serializer encodes the userinfo, path, query and fragment components", but it only encodes non-ASCII characters (#615) and C0 controls / space / DEL (#614). The ASCII punctuation in WHATWG's per-component percent-encode sets passes through verbatim, so for URLs both validators accept, the container fetches a different (raw) spelling than the Worker fetches (its encoded form).
Evidence (verified 2026-10-22, current main 23eefe1)
validate_crawl_url (Python) vs new URL(...).toString() (the Worker's serializer, Node 24):
| Input |
Container returns |
Worker returns |
http://example.com/a"b |
http://example.com/a"b |
http://example.com/a%22b |
http://example.com/a<b>c |
http://example.com/a<b>c |
http://example.com/a%3Cb%3Ec |
http://example.com/a + backtick + b |
raw backtick |
a%60b |
http://example.com/a{b}c |
http://example.com/a{b}c |
http://example.com/a%7Bb%7Dc |
http://example.com/a^b |
http://example.com/a^b |
http://example.com/a%5Eb |
http://example.com/?q=a"b<c |
raw |
?q=a%22b%3Cc |
http://example.com/#a"b<c> + backtick + d |
raw |
#a%22b%3Cc%3E%60d |
http://us"[email protected]/ |
http://us"[email protected]/ |
http://us%[email protected]/ |
A per-character probe of the WHATWG serializer gives the exact sets (on top of the already-encoded non-ASCII / C0 / space / DEL):
- path:
" < > ^ ` { }
- query:
" < > (note: backtick, ^, {, } stay raw in query)
- fragment:
" < > `
- userinfo:
" ; < = > @ [ ] ^ ` { | } (the delimiter characters / : ? # \ never survive urlparse into the userinfo, so they need no arm)
The sets are per-component: a single shared set would over-encode the query (e.g. a raw backtick in a query is exactly what the Worker fetches) and under-encode the userinfo.
Why it matters
Acceptance criteria
_url_with_encoded_components percent-encodes the per-component WHATWG sets above in userinfo, path, query and fragment, in addition to the existing non-ASCII / C0 / space / DEL encoding; existing %XX sequences are never double-encoded.
- The query component is NOT encoded with the path set (backtick /
^ / { / } in a query stay raw, matching the Worker byte-for-byte).
- New tests in
test/test_container_validate.py pin the table above (path, query, fragment, userinfo arms), and the existing differential/parity tests still pass.
- Python suite (
test_container_validate.py) and TS suite (lib.test.ts) both green.
Suggested fix
Give _encode_url_component a per-component extra-set parameter (path / query / fragment / userinfo sets as probed above) and pass the matching set from each call site in _url_with_encoded_components; update the function's comment to name the sets it implements. Activitydeveloping-today-fleet commented on Nov 24, 2026
AUDIT-7 Lane 2 slice 3 — closing evidence. Verified against the issue body and merged implementation PR(s):
The issue had zero comments in the fresh pre-action read; this comment records the missing close evidence.
MetadataMetadataapp/lab-ops-hubPackage/app: lab-ops-hub (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label) DevelopmentNo branches or pull requestsIssue actions
|