Skip to content

Commit

Permalink
Also check lobby length on reconnect.
Browse files Browse the repository at this point in the history
  • Loading branch information
koenbollen committed Sep 6, 2023
1 parent 6c28610 commit 7832dec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/signaling/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@ func (p *Peer) HandleJoinPacket(ctx context.Context, packet JoinPacket) error {
if packet.Lobby == "" {
return fmt.Errorf("no lobby code supplied")
}
if len(packet.Lobby) > 20 {
return fmt.Errorf("lobby code too long")
}

p.Lobby = packet.Lobby

Expand Down

0 comments on commit 7832dec

Please sign in to comment.