wsun / multibuzzer

Simple multiplayer buzzer system, e.g. for trivia night or quiz bowl
https://multibuzz.app/
MIT License
76 stars 36 forks source link

Room size limit can be altered #57

Closed BenSnellgrove closed 5 days ago

BenSnellgrove commented 1 week ago

By POSTing to the /games/${Buzzer.name}/create endpoint directly, a payload with a room size of values other than the default (200) can be given, accepted and used.

Example:

Room size of 5000

Target:

https://www.multibuzz.app/games/buzzer/create

Payload:

{"numPlayers":5000}

Result:

image

Reasonable values over 200 do not seem to cause crashes

Values under 200 and above 0 cause no issue

Setting capacity at 0 creates a room of size 1 Values under 0 return internal server error

My guess is that this is all handled by boardgame.io, or whoever owns the "axios" library, as I'm talking directly to the creation endpoint, and as such this is not something you can fix in this repo. Thought I'd submit this anyway

wsun commented 5 days ago

Thanks for taking the time to share this! I took a look - yes this is managed by boardgame.io. Since I'm running multibuzz.app on a cheap machine that may not be able to handle arbitrarily large rooms, I've updated my fork of the library to prevent large rooms from being created directly from the endpoint.