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 #8892DescriptionEvidence
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
Activitydeveloping-today commented on Nov 12, 2026 added 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 effort/sSmall: expected under 2 hours of work and removed task/triageQueue packet kind: verify, reproduce, and route this item effort/xsTrivial: expected under 30 minutes of work on Nov 12, 2026dezren39 commented on Nov 12, 2026
🤖 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).
dezren39 commented on Nov 12, 2026
🤖 Agent note · done task 15101 for issue #8892 — fixed and merged (resumed by lane code-c)
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|