Summary
The signaling handlers (offer, answer, ice-candidate) destructure roomId but do not validate it against active streams.
Problem
The server does not verify:
- Whether the room exists
- Whether the socket belongs to the room
Suggested Improvement
Before forwarding signaling messages, validate:
activeStreams.has(roomId)
socket.rooms includes the room
This would improve robustness and security.
Summary
The signaling handlers (
offer,answer,ice-candidate) destructureroomIdbut do not validate it against active streams.Problem
The server does not verify:
Suggested Improvement
Before forwarding signaling messages, validate:
activeStreams.has(roomId)socket.roomsincludes the roomThis would improve robustness and security.