summaryrefslogtreecommitdiff
path: root/src/node_native_module.cc
diff options
context:
space:
mode:
authorChris Opperwall <copperwall@gmail.com>2020-10-19 18:24:08 -0700
committerMichaƫl Zasso <targos@protonmail.com>2021-09-04 15:14:29 +0200
commit482459edd4f19e8f437b8711c4af3fcc5682a0e5 (patch)
tree982f7d00216cbd5d762fc5cc002b4bda4145222d /src/node_native_module.cc
parent43d28f5f000f5aa1ed30edb2a366a77682c9d5dd (diff)
downloadnode-new-482459edd4f19e8f437b8711c4af3fcc5682a0e5.tar.gz
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: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'src/node_native_module.cc')
-rw-r--r--src/node_native_module.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node_native_module.cc b/src/node_native_module.cc
index 9776d12cc1..f13e53221e 100644
--- a/src/node_native_module.cc
+++ b/src/node_native_module.cc
@@ -71,6 +71,7 @@ void NativeModuleLoader::InitializeModuleCategories() {
std::vector<std::string> prefixes = {
#if !HAVE_OPENSSL
"internal/crypto/",
+ "internal/debugger/",
#endif // !HAVE_OPENSSL
"internal/bootstrap/",