Skip to content

rpcserver: Fix CheckOrigin inverted err check.#3652

Merged
davecgh merged 1 commit intodecred:masterfrom
jholdstock:inverr
Apr 3, 2026
Merged

rpcserver: Fix CheckOrigin inverted err check.#3652
davecgh merged 1 commit intodecred:masterfrom
jholdstock:inverr

Conversation

@jholdstock
Copy link
Copy Markdown
Member

When both the Origin header and the request Host header lack an explicit port (common behind reverse proxies on standard ports 443/80), both values collapse to empty string, and equalASCIIFold("", "") returns true - allowing any cross-origin websocket handshake to succeed.

When both the `Origin` header and the request `Host` header lack an
explicit port (common behind reverse proxies on standard ports 443/80),
both values collapse to empty string, and `equalASCIIFold("",
"")` returns `true` - allowing **any cross-origin websocket handshake**
to succeed.
@davecgh davecgh added this to the 2.2.0 milestone Apr 3, 2026
@davecgh davecgh merged commit a66578b into decred:master Apr 3, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants