Commit f52da948 authored by Chris Opperwall's avatar Chris Opperwall Committed by Rich Trott
Browse files

debugger: validate sec-websocket-accept response header

This addresses a TODO to validate that the sec-websocket-accept header
in the WebSocket handshake response is valid. To do this we need to
append the WebSocket GUID to the original key sent in sec-websocket-key,
sha1 hash it, and then compare the base64 encoding with the value sent
in the sec-websocket-accept response header.

If they don't match, an error is thrown.

PR-URL: https://github.com/nodejs/node/pull/39357
Refs: https://github.com/nodejs/node-inspect/pull/93


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
parent ffa79b37
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment