GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||
GeezerVison is showing github.com — 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 Closed 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) DescriptionSummaryThe container validator ( Evidence (verified on main
|
| Input | Container returns | Worker (WHATWG) returns |
|---|---|---|
http://example.com/..; |
http://example.com/ |
http://example.com/..; |
http://example.com/.; |
http://example.com/ |
http://example.com/.; |
http://example.com/foo/..; |
http://example.com/ |
http://example.com/foo/..; |
http://example.com/a/.; |
http://example.com/a/ |
http://example.com/a/.; |
http://example.com/a/b/..; |
http://example.com/a/ |
http://example.com/a/b/..; |
http://example.com/%2e; |
http://example.com/ |
http://example.com/%2e; |
http://example.com/%2e%2e; |
http://example.com/ |
http://example.com/%2e%2e; |
http://example.com/..;?q |
http://example.com/?q |
http://example.com/..;?q |
Controls 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.
urlparse splits the last path segment at the first ; into path + params. For a bare trailing ; the params are the empty string:
urlparse("http://example.com/..;") -> path="/..", params=""
urlparse("http://example.com/..;foo") -> path="/..", params="foo"
_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._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 /...The 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.
validate_crawl_url returns the WHATWG form for the table above (segments ..;, .;, %2e;, %2e%2e; preserved verbatim, including before ?/#)._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.pkgs/lab-ops-hub/test/test_container_validate.py pin the bare-; spellings alongside the existing ..;foo controls; existing suite stays green.style(lab-ops-hub): ruff-format the #655 rebuild sites (treefmt)
Merge pull request #656 from developing-today/creator/655-bare-semico…
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.