Skip to content

Commit

Permalink
added socket.destroy after rejecting protocol upgrade (for security
Browse files Browse the repository at this point in the history
reasons)
  • Loading branch information
Robin Gottfried committed May 21, 2020
1 parent 95b2fc4 commit ff1efe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ function setupWebsocketServer(httpServer, clientsManager) {
clientsManager.authenticate(request, socket, (err, client) => {
if (err || !client) {
debug("Destroying connection");
// socket.destroy();
socket.end('HTTP/1.1 401 Unauthorized\r\n\r\n','ascii');
socket.destroy();
return;
}

Expand Down

0 comments on commit ff1efe7

Please sign in to comment.