Fix: Service Worker persistence, Ping-Pong failsafe, URL parsing, and server rate limit DoS

This commit is contained in:
Timo
2026-04-22 10:31:46 +02:00
parent 88cb313fc0
commit 0b28274766
4 changed files with 48 additions and 10 deletions
+5
View File
@@ -148,6 +148,11 @@ io.on('connection', (socket) => {
log('CONN', `New connection: ${socket.id} from ${clientIp}`);
socket.on(EVENTS.JOIN_ROOM, async (payload) => {
if (!checkEventRate(socket.id)) {
log('SECURITY', `Event rate limit exceeded for socket (JOIN): ${socket.id}`);
socket.disconnect(true);
return;
}
if (!payload || typeof payload.roomId !== 'string') return;
const { roomId, password, peerId, protocolVersion } = payload;
try {