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 — fix(lab-ops-hub): return WHATWG-normalized URLs from the container validator (#633) by dezren39 · Pull Request #644 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 23, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Problem

Fixes #633.

validate_crawl_url in the container crawler (pkgs/lab-ops-hub/container/app.py) returned the caller's spelling with only the character-encoding fixes of #614/#615/#618 — no WHATWG normalization — while the Worker validator returns u.toString(). For the same accepted target the two crawlers recorded and fetched different URLs:

Input Container returned Worker returns
http://example.com/a/../b http://example.com/a/../b http://example.com/b
http://example.com/%2e%2e/admin verbatim http://example.com/admin
HTTP://EXAMPLE.COM/Path http://EXAMPLE.COM/Path http://example.com/Path
http://example.com:80/x, :080 verbatim http://example.com/x

The fetcher consequence is the serious arm: _fetch_crawl sent /a/../b and /%2e%2e/admin on the wire verbatim, so an origin (or proxy/WAF) that routes on the raw request target serves the container a different resource than the Worker — and %2e%2e is the classic path-confusion spelling when one layer resolves it and another does not.

Solution

New _normalize_validated_url, applied at both validate_crawl_url return sites (DNS names and IP literals); redirect targets inherit it via _ValidatingRedirectHandler → validate_crawl_url.

  • _resolve_dot_segments: a segment is a single-dot segment iff it is . or %2e, a double-dot segment iff it is .., .%2e, %2e. or %2e%2e (any case). Single-dot drops, double-dot pops the previous segment, neither climbs above the root, and a trailing dot segment becomes an empty final segment (/a/. → /a/, /a/.. → /, //%2e → //). Empty segments are preserved (//a//b verbatim, /a//../b → /a/b), and longer/double-encoded spellings are data, never double-decoded (%2e%2e%2e, %252e%252e pass through). The path's ;params tail is rejoined before resolving, so a trailing ..;foo is data, not a double-dot segment.
  • Host: ASCII-lowercased in the returned netloc. The IDN spelling itself is deliberately kept, as before (judged in mapped form, fetched via IDNA — lab-ops-hub: container validator returns non-ASCII path/query/userinfo verbatim — fetcher raises UnicodeEncodeError on URLs both validators accept #615); only case folds.
  • Port: canonicalized as an integer — the scheme's default port is dropped including leading-zero spellings (:080, :0443), any other port is stripped of leading zeros (:08080 → :8080), and an empty port's colon is dropped (that one arm of lab-ops-hub: container validator returns empty path, empty port and empty userinfo un-normalized — recorded URL differs from the Worker #639 rides along with port canonicalization; lab-ops-hub: container validator returns empty path, empty port and empty userinfo un-normalized — recorded URL differs from the Worker #639's empty-path and empty-userinfo arms remain open).

No verdict changes: blocked hosts in these spellings are still refused by the ordinary checks, for the right reason (#633's controls verified).

Verification

  • Reproduced on main 9298c5f2 before the fix (all issue spellings returned verbatim).
  • New tests: Python battery (24 normalized cases + data controls + blocked controls), a redirect-handler pin (normalized target followed), a fetcher end-to-end test (the validated resolved path /b, /admin is what reaches the server), and a TS pin of the Worker form. Python 54/54, TS 37/37.
  • Ablation: with only app.py reverted, exactly the 3 new Python tests fail.
  • Differential vs the real Worker validator under Bun: byte-identical returned URLs over the full issue battery plus a 1500-case fuzz over dot-segment × host-case × port spellings (0 diffs; the only known remaining host divergence is the pre-existing, intentional IDN spelling — the container keeps münchen.de, the Worker serializes punycode).
  • ruff format applied. Single-repo: no validate_crawl_url/validateCrawlUrl copy exists in the opencode/openchamber/nix clones (grep-verified), so no cross-repo port is owed.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
Muse Sweep
fix(lab-ops-hub): return WHATWG-normalized URLs from the container va…
212d1a0
…lidator (#633)

validate_crawl_url returned dot segments, host case and default
ports verbatim, so the container recorded — and fetched — a
different URL than the Worker for the same accepted target
(/a/../b and /%2e%2e/admin went on the wire verbatim).

Add _normalize_validated_url, applied at both return sites:
_resolve_dot_segments resolves literal and %2e dot segments
(any case, trailing dot segments become a trailing slash, no
climbing above the root, empty segments and %252e data
preserved), the host is ASCII-lowercased (IDN spelling kept, as
before), and the port is canonicalized (scheme default dropped
including leading-zero spellings, other ports stripped of leading
zeros, empty port colon dropped). Redirect targets inherit the
form via validate_crawl_url.

Tests: Python battery + redirect-handler pin + fetcher end-to-end
(resolved path reaches the server), TS pin of the Worker form.
Differential vs the Worker validator under Bun: byte-identical
returned URLs over the issue battery and a 1500-case fuzz over
dot-segment/host-case/port spellings.
@dezren39
dezren39 requested a review from a team as a code owner October 23, 2026 04:06
@github-actions github-actions Bot assigned dezren39 Oct 23, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-23T04:06:16.886932Z 212d1a0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 50de6c53-3279-4a91-94ed-806a5d907d71
📥 Commits

Reviewing files that changed from the base of the PR and between 9298c5f and 212d1a0.

📒 Files selected for processing: 3
  • pkgs/lab-ops-hub/container/app.py
  • pkgs/lab-ops-hub/test/lib.test.ts
  • pkgs/lab-ops-hub/test/test_container_validate.py
+------------------------------------------------+
| PENDU: Prompt Engineered Nifty Debugging Unit. |
+------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit 7295601 into main Oct 23, 2026
4 of 5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the sweep/633-dotseg-hostcase-port branch October 23, 2026 04:07
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 24, 2026
lab-ops-hub: container validator returns dot segments, host case and default ports un-normalized — fetcher requests a different path than the Worker #633
Closed
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 2 — Closed-Issues Review (past month, since 2026-10-23) #13878
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

lab-ops-hub: container validator returns dot segments, host case and default ports un-normalized — fetcher requests a different path than the Worker

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.