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 — id(web): reject Origin scheme mismatches for the same authority · Issue #8892 · developing-today/code

id(web): reject Origin scheme mismatches for the same authority #8892

New issue
Copy link
New issue
Copy link
Closed
#8905
Closed
id(web): reject Origin scheme mismatches for the same authority#8892
#8905
Copy link
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/securitySecurity issue or security hardeningpriority/highImportant and time-sensitivesource/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 12, 2026
Issue body actions

Evidence

On current main (51121b4c00528698c434e1f9f72c637688c0f0a8), pkgs/id/src/web/security.rs:139-143 extracts only the authority from an Origin and discards its scheme. The middleware at :213-221 then decides whether Origin matches Host using only authority_normalized at :218-219.

For Host: localhost:3000 and Origin: https://localhost:3000, origin_authority returns localhost:3000; both values normalize identically, so the guard treats the request as same-origin even though https://localhost:3000 and http://localhost:3000 are different origins. This follows directly from the current helper and comparison; no in-browser exploit was reproduced in this pass.

The module contract at security.rs:12-18 says the Origin must match by host and port, but the security purpose at :12-15 is to reject cross-origin browser fetches and WebSocket handshakes. #814 fixed the different-port case and records the general origin definition as scheme + host + port, but its acceptance criteria cover port and host only. This is a residual scheme-comparison gap, not a duplicate of #814. It is also distinct from #8880/#8883, which handle malformed bracketed-authority syntax rather than scheme mismatches. Fresh all-state issue searches for Origin scheme/scheme mismatch and all-state PR search found no specific follow-up.

Why it matters

The guard can accept a cross-origin request when the Origin and Host authorities match but their schemes differ, undermining the same-origin policy the middleware documents for CSRF and cross-site WebSocket protection. Browser reachability depends on the served protocol and browser mixed-content behavior; this issue does not assert a demonstrated exploit.

Acceptance criteria

  • Define how the request scheme is determined for the supported serving/deployment modes (including any TLS-terminating proxy behavior the app supports) and compare it with the Origin scheme, not just host and port.
  • Reject a scheme-mismatched Origin with the existing forbidden response, including same-host/same-port HTTP versus HTTPS cases.
  • Preserve valid same-scheme cases, the id(web): Origin check ignores the port — a different localhost port passes as same-origin (CSRF/CSWSH gap in security.rs) #814 different-port refusal, the portless-authority policy, and opaque Origin: null refusal.
  • Add guard-level regression tests for matching and mismatching schemes; run them when the current web build is available (the current-main web test build has unrelated tracked failures under pkgs/id: web lib does not compile on main — crate-split visibility left 5 unresolved/private sites in src/web #8795).}

Activity

Next
  1. dezren39
    added
    kind/securitySecurity issue or security hardening
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    on Nov 12, 2026
  2. developing-today commented on Nov 12, 2026

    @developing-today
    developing-todayBot
    on Nov 12, 2026 – with developing.today
    Contributor
    More actions

    CODE-2691

  3. dezren39
    added
    priority/normalOrdinary priority (the default)
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    effort/xsTrivial: expected under 30 minutes of work
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    priority/highImportant and time-sensitive
    effort/sSmall: expected under 2 hours of work
    and removed
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    priority/normalOrdinary priority (the default)
    effort/xsTrivial: expected under 30 minutes of work
    on Nov 12, 2026
  4. 9 remaining items

  5. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    on Nov 12, 2026
  6. dezren39 commented on Nov 12, 2026

    @dezren39
    dezren39
    on Nov 12, 2026
    MemberAuthor
    More actions

    🤖 Agent note · resumed task 15101 for issue #8892 — lane code-c (CI wait released)

    • Resuming from lane code-d's park (PR fix(id): reject Origin scheme mismatches in the web same-origin guard (#8892) #8905, head a29636c): the CI wait has completed. Checks: 12 pass / 6 skipping / 8 fail. The gating check basic: id builds without world feature passes (7m31s), as do production line limit, scripts-test (3.12/3.14), and the guard PR check list.
    • All 8 failures are in untouched areas: mcpx-test lint/unit/e2e shards 0,3,4,5 + ci-ok aggregate, and fleet-search parity. The PR diff is a single file, pkgs/id/src/web/security.rs, which none of those exercise; fleet-search parity also failed today on the docs-only PR docs(agents): slim AGENTS.md to its 8000-byte rulebook budget #8919, and the same mcpx/fleet-search set was recorded as pre-existing main breakage by task 15106 this morning.
    • Codex: review completed at head a29636c with no findings.
    • Next: merge PR fix(id): reject Origin scheme mismatches in the web same-origin guard (#8892) #8905 and complete task 15101 as fixed_merged (implementing lane's verification stands: guard tests reproduced the scheme mismatch first — 200 vs want 403 — then 24/24 pass in the standalone harness; the in-repo id web build is broken pre-existing on main, issue pkgs/id: web lib does not compile on main — crate-split visibility left 5 unresolved/private sites in src/web #8795).
  7. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status:in-review
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 12, 2026
  8. dezren39
    added a commit that references this issue on Nov 12, 2026

    fix(id): reject Origin scheme mismatches in the web same-origin guard (…

    22fee7c
  9. dezren39
    closed this as completedin #8905on Nov 12, 2026
  10. developing-today
    added
    status:done
    on Nov 12, 2026
  11. dezren39 commented on Nov 12, 2026

    @dezren39
    dezren39
    on Nov 12, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done task 15101 for issue #8892 — fixed and merged (resumed by lane code-c)

    • Fix: PR fix(id): reject Origin scheme mismatches in the web same-origin guard (#8892) #8905 (implemented by lane code-d, head a29636c; squash-merged as 22fee7c) — the id(web) Origin guard in pkgs/id/src/web/security.rs now compares the Origin scheme against request_scheme (http for the direct listener; https only when --web-cookie-secure declares TLS termination in front) alongside the authority. Verified present on origin/main after the merge.
    • Tests (implementing lane, per its park note): guard tests reproduced the mismatch first (200 vs want 403), then 24/24 pass in the standalone harness; the in-repo id web build is broken pre-existing on main (issue pkgs/id: web lib does not compile on main — crate-split visibility left 5 unresolved/private sites in src/web #8795, crate-split visibility errors outside security.rs).
    • CI (this resume): checks complete — 12 pass / 6 skipping / 8 fail. Gating basic: id builds without world feature PASS, plus production line limit, scripts-test, guard PR check list. All failures are mcpx-test (lint/unit/e2e shards/ci-ok) and fleet-search parity in untouched areas — the diff is security.rs only; the same set is recorded as pre-existing main breakage today (tasks 15106/15109).
    • Codex: review completed at head a29636c, no findings.
    • Issue id(web): reject Origin scheme mismatches for the same authority #8892 is CLOSED by the merge; lifecycle labels removed.
  12. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/sSmall: expected under 2 hours of workkind/securitySecurity issue or security hardeningpriority/highImportant and time-sensitivesource/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    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.