Validate roomId in WebRTC signaling handlers
- Dominant language
- JavaScript
- Stars
- 9
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
## 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.
Contributor guide
Research direction
Locate the WebRTC signaling handlers for `offer`, `answer`, and `ice-candidate`, then inspect how `activeStreams` and `socket.rooms` are used before messages are forwarded. Done means each handler verifies that the room exists and that the socket belongs to it before forwarding signaling messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- audio-video-rtc, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100