diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-06-14 23:51:40 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2021-06-14 21:53:42 +0000 |
commit | 48aa9edd3a1fbbd405c1001d052b0bbdf46b3de9 (patch) | |
tree | cd2f1600bb12bbdf6cf2eb7a21ec674c02031b09 | |
parent | bbf77f8d0b06f8f8e8cc0c4c0188e5737d9f6363 (diff) | |
download | server-48aa9edd3a1fbbd405c1001d052b0bbdf46b3de9.tar.gz |
Don't leak chat to observers!
-rw-r--r-- | server.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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)); |