hapijs / nes

WebSocket adapter plugin for hapi routes
Other
503 stars 87 forks source link

server falls with bad cookie header #171

Closed iipokypatop closed 7 years ago

iipokypatop commented 7 years ago

Node server falls. I think problem is in request without or bad cookie header.

/home/deploy/proj/shared/node_modules/nes/lib/socket.js:540 const auth = state[config.cookie]; ^

TypeError: Cannot read property 'nes' of null at /home/deploy/proj/shared/node_modules/nes/lib/socket.js:540:27 at internals.Definitions.parse.Items.serial.internals.unsign.Items.serial.internals.unsign [as parse] (/home/deploy/proj/shared/node_modules/hapi/node_modules/statehood/lib/index.js:133:16) at internals.Socket._send.internals.Socket._flush.internals.Socket._onMessage.internals.Socket._processHello.internals.Socket._processHelloSubscriptions.internals.Socket._processRequest.internals.Socket._processMessage.internals.Socket._processSubscription.internals.Socket._authenticate (/home/deploy/proj/shared/node_modules/nes/lib/socket.js:538:39) at new module.exports.internals.Socket.listener (/home/deploy/proj/shared/node_modules/nes/lib/socket.js:41:10) at module.exports.internals.Listener._add.ws.once [as _add] (/home/deploy/proj/shared/node_modules/nes/lib/listener.js:74:20) at WebSocketServer. (/home/deploy/proj/shared/node_modules/nes/lib/listener.js:53:14) at emitOne (events.js:77:13) at WebSocketServer.emit (events.js:169:7) at /home/deploy/proj/shared/node_modules/nes/node_modules/ws/lib/WebSocketServer.js:91:14 at completeHybiUpgrade2 (/home/deploy/proj/shared/node_modules/nes/node_modules/ws/lib/WebSocketServer.js:284:5) at completeHybiUpgrade1 (/home/deploy/proj/shared/node_modules/nes/node_modules/ws/lib/WebSocketServer.js:309:13) at WebSocketServer.handleHybiUpgrade (/home/deploy/proj/shared/node_modules/nes/node_modules/ws/lib/WebSocketServer.js:337:3) at WebSocketServer.handleUpgrade (/home/deploy/proj/shared/node_modules/nes/node_modules/ws/lib/WebSocketServer.js:173:26) at Server.WebSocketServer._onServerUpgrade (/home/deploy/proj/shared/node_modules/nes/node_modules/ws/lib/WebSocketServer.js:89:12) at emitThree (events.js:97:13) at Server.emit (events.js:175:7)

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.