Files
bun.sh/test/js
Claude Bot ca6b28b2ac fix(websocket): validate Sec-WebSocket-Accept header per RFC 6455
The WebSocket upgrade client checked that the Sec-WebSocket-Accept
header was present but never validated its value against the expected
SHA-1 hash of the client's Sec-WebSocket-Key concatenated with the
RFC 6455 magic GUID. This allowed a MitM attacker to fake a WebSocket
handshake with any arbitrary accept value.

Store the expected accept value (computed during request construction)
on the client struct and validate it against the server's response
during the upgrade handshake.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-12 04:49:38 +00:00
..
2024-12-12 02:07:29 -08:00