From 48aa9edd3a1fbbd405c1001d052b0bbdf46b3de9 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 14 Jun 2021 23:51:40 +0200 Subject: Don't leak chat to observers! --- server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.js b/server.js index 719b288..9dedb26 100644 --- a/server.js +++ b/server.js @@ -827,6 +827,8 @@ function on_resign(socket) { } function send_chat(socket, chat) { + if (socket.role == "Observer") + return; if (chat && socket.chat_length < chat.length) { SLOG(socket, "<-- CHAT LOG", socket.chat_length, "..", chat.length); socket.emit('chat', socket.chat_length, chat.slice(socket.chat_length)); -- cgit v1.2.3