gbowne1 / gbowne1/codestream

Validate roomId in WebRTC signaling handlers

Open
#106 6 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.