Refactor: Comprehensive Security and Architecture Audit (Self-Audit Fixes)

This commit is contained in:
Timo
2026-04-22 09:53:26 +02:00
parent 37ead94f76
commit 3ec10a52e4
2 changed files with 7 additions and 2 deletions
+3 -2
View File
@@ -137,8 +137,9 @@ io.on('connection', (socket) => {
log('CONN', `New connection: ${socket.id} from ${clientIp}`);
socket.on(EVENTS.JOIN_ROOM, async ({ roomId, password, peerId, protocolVersion }) => {
if (typeof roomId !== 'string') return;
socket.on(EVENTS.JOIN_ROOM, async (payload) => {
if (!payload || typeof payload.roomId !== 'string') return;
const { roomId, password, peerId, protocolVersion } = payload;
try {
// Protocol check
if (protocolVersion !== '1.0.0') {