From 7832deccf7bdbc0c78bfb6a9e6ace1ab20f3bca4 Mon Sep 17 00:00:00 2001 From: Koen Bollen Date: Wed, 6 Sep 2023 15:07:54 +0200 Subject: [PATCH] Also check lobby length on reconnect. --- internal/signaling/peer.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/signaling/peer.go b/internal/signaling/peer.go index 1f3728c..8b380fa 100644 --- a/internal/signaling/peer.go +++ b/internal/signaling/peer.go @@ -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