GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #618

New issue
Copy link
New issue
Copy link
Closed
#619
Closed
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#618
#619
Copy link
Assignees
dezren39
Labels
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)

Description

@dezren39
dezren39
opened on Oct 23, 2026
Issue body actions

Summary

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

  • The URL validate_crawl_url returns is the URL the fetcher fetches (container/app.py:785, urllib.request.Request). Raw ", <, > etc. go onto the request line unencoded: http.client only rejects C0/space/DEL (_contains_disallowed_url_pchar_re), so these sail through to the origin, where servers and intermediaries commonly reject a raw "/</> in the request target with 400 — or parse it differently — while the Worker fetches the encoded form of the same validated URL successfully. Same validated target, different crawl outcome per backend: the lab-ops-hub: container validator returns C0 controls, space and DEL verbatim outside the host — fetcher raises InvalidURL on URLs both validators accept (PR #612 residual) #614/lab-ops-hub: container validator returns non-ASCII path/query/userinfo verbatim — fetcher raises UnicodeEncodeError on URLs both validators accept #615 divergence class, one character class later.
  • The comment on _encode_url_component overstates what the function does, which is how this residual stayed invisible through two fixes in this exact spot.

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.

Activity

  1. github-actions
    assigned
    dezren39
    on Oct 23, 2026
  2. dezren39
    added 2 commits that reference this issue on Oct 23, 2026

    lab-ops-hub: wrap the _encode_url_component condition for treefmt (#618)

    d9e517e

    lab-ops-hub: apply ruff format to the #618 changes

    b261177
  3. dezren39
    closed this as completedin #619on Oct 23, 2026
  4. dezren39
    added a commit that references this issue on Oct 23, 2026

    Merge pull request #619 from developing-today/creator/618-ascii-punct…

    07a16b7
  5. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 24, 2026 – with developing.today fleet
    Contributor
    More actions

    AUDIT-7 Lane 2 slice 3 — closing evidence. Verified against the issue body and merged implementation PR(s):

    • PR #619 — lab-ops-hub: percent-encode WHATWG ASCII punctuation sets on the container validator's returned URL (#618) (merged 2026-10-23)

    The issue had zero comments in the fresh pre-action read; this comment records the missing close evidence.

  6. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    app/lab-ops-hubPackage/app: lab-ops-hub (pkgs/ or apps/ in this repo)
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

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)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.