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 fetcher cannot fetch any URL with userinfo — urllib resolves 'user@host' as the hostname, so every userinfo target both validators accept 502s in the container (PR #616/#619 residual) · Issue #622 · developing-today/code

lab-ops-hub: container fetcher cannot fetch any URL with userinfo — urllib resolves 'user@host' as the hostname, so every userinfo target both validators accept 502s in the container (PR #616/#619 residual) #622

New issue
Copy link
New issue
Copy link
Closed
#634
Closed
lab-ops-hub: container fetcher cannot fetch any URL with userinfo — urllib resolves 'user@host' as the hostname, so every userinfo target both validators accept 502s in the container (PR #616/#619 residual)#622
#634
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

Finding

The container crawler cannot fetch any URL that carries userinfo — not just the non-ASCII or punctuation spellings PRs #616/#619 fixed the encoding for, but plain ASCII http://[email protected]/ and http://user:[email protected]/.

Both validators accept userinfo targets and validate_crawl_url now carefully percent-encodes the userinfo on the returned URL (#615/#618). But _fetch_crawl (pkgs/lab-ops-hub/container/app.py, def _fetch_crawl ~line 827) hands that returned URL straight to urllib.request. urllib never strips userinfo from the netloc: Request.host keeps the whole user@host / user:pass@host string, http.client is constructed with it as the hostname, and getaddrinfo fails on it. The result is a URLError before any request is sent, do_POST surfaces it as a 502, and the Worker fallback — whose WHATWG fetch converts userinfo to an Authorization: Basic header and fetches the target fine — crawls it instead. This is the same accept/502/fallback divergence class as #572/#615/#614/#618, except it covers the entire userinfo component rather than one character set.

Evidence

  • PR lab-ops-hub: percent-encode non-ASCII outside the host in the container validator (#615) #616 (commit 3201b886, fixes lab-ops-hub: container validator returns non-ASCII path/query/userinfo verbatim — fetcher raises UnicodeEncodeError on URLs both validators accept #615) encoded non-ASCII in the userinfo on the returned URL so "the URL the fetcher fetches" would work; its fetcher end-to-end test (test_fetches_percent_encoded_non_ascii_targets) covers only a path/query spelling — no fetcher test in lab-ops-hub: percent-encode non-ASCII outside the host in the container validator (#615) #616, lab-ops-hub: percent-encode C0 controls, space and DEL outside the host in the container validator (#614) #617 or lab-ops-hub: percent-encode WHATWG ASCII punctuation sets on the container validator's returned URL (#618) #619 ever fetches a userinfo URL.
  • PR lab-ops-hub: percent-encode WHATWG ASCII punctuation sets on the container validator's returned URL (#618) #619 (commit fea31bbe, fixes 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) extended the userinfo encoding (_encode_userinfo, ~line 724; _url_with_encoded_components, ~line 739) and pinned the returned forms in test_ascii_punctuation_percent_encoded_per_component — again validation-only, no fetch of a userinfo target.
  • Reproduced on current main 07a16b76 with the app's own _fetch_crawl against a local HTTP server (proxy env unset), on both Python 3.12.3 and Python 3.13.14 (the container image uses nixpkgs pkgs.python3):
    • control http://127.0.0.1:<port>/x → 200, request received, no Authorization header.
    • http://[email protected]:<port>/x → URLError: <urlopen error [Errno -2] Name or service not known>; no request reaches the server.
    • http://user:pa%[email protected]:<port>/x (the lab-ops-hub: percent-encode WHATWG ASCII punctuation sets on the container validator's returned URL (#618) #619 returned form) → same URLError.
    • http://caf%C3%[email protected]:<port>/x (the lab-ops-hub: container validator returns non-ASCII path/query/userinfo verbatim — fetcher raises UnicodeEncodeError on URLs both validators accept #615 returned form) → same URLError.
  • validate_crawl_url on the same main returns http://[email protected]/, http://user:[email protected]/ and http://caf%C3%[email protected]/ as accepted crawl targets, and the Worker validator (src/lib.ts validateCrawlUrl, run under Bun) accepts the same spellings — so both validators agree the target is crawlable while the container fetcher can never fetch it.
  • Related returned-form detail from the same differential (517-case battery, container validator vs Node new URL): for an empty password (http://user:@example.com/) the Worker returns http://[email protected]/ and for a bare @ (http://@example.com/) it returns http://example.com/, while the container returns both spellings verbatim. A fetcher fix that strips userinfo and only sends credentials that are actually present resolves these too; they are noted here, not filed separately.

Why it matters

Any crawl target with credentials in the URL — a documented, validator-accepted spelling the last three PRs in this area explicitly polished — silently fails in the container and is re-crawled by the Worker fallback, recording the wrong source and masking the failure as a generic 502. The encoding work in #616/#619 cannot take effect for the userinfo component until the fetcher can fetch a userinfo URL at all.

Acceptance criteria

  • _fetch_crawl successfully fetches a validated URL with userinfo (plain, password-bearing, and percent-encoded forms) end-to-end against a local test server, sending the credentials as an Authorization: Basic header built from the percent-decoded username/password, matching WHATWG fetch behaviour; no credentials header is sent when the userinfo is empty (http://@host/).
  • Redirect targets carrying userinfo (validated by _ValidatingRedirectHandler) fetch the same way.
  • New fetcher tests cover userinfo spellings end-to-end (mirroring the existing path/query fetcher tests for lab-ops-hub: container validator returns non-ASCII path/query/userinfo verbatim — fetcher raises UnicodeEncodeError on URLs both validators accept #615/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), and ablation shows they fail on the pre-fix fetcher.
  • A container-vs-Worker differential over userinfo spellings (plain ASCII, non-ASCII, ASCII punctuation, empty user/password) shows the container fetching the same target the Worker fetches, with the existing Python (47) and TS suites still passing.

Activity

  1. github-actions
    assigned
    dezren39
    on Oct 23, 2026
  2. dezren39
    closed this as completedin #634on Oct 23, 2026
  3. 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 #634 — fix(lab-ops-hub): fetch userinfo URLs with Basic auth in the container crawler (merged 2026-10-23)

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

  4. 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.