POLIMI-FER-codebenders / tournament_app

Tournament app for Code Defenders made by student team of POLIMI and FER students
GNU Lesser General Public License v3.0
0 stars 0 forks source link

There is no check on tournament and team names #53

Closed SimoneMezzaro closed 1 year ago

SimoneMezzaro commented 1 year ago

When I put a very long name for tournament and team the frontend sends the request anyway. Instead it should check if the name is valid (e.g with a regex).

Backend side this checks seems to be present (at least for tournaments), but I think they're not working because server returns: {"timestamp":1671025105708,"status":500,"error":"Internal Server Error","path":"/api/tournament/create"}

FabioPatella commented 1 year ago
if(this.state.name.length>255) this.setState({messageError:"the name must be 255 char maximum"});

on frontend there is currently this check there is also on tournament creation ( with a wrong message that i have changed) let me know if i have to add other checks

SimoneMezzaro commented 1 year ago

For tournaments it turned out the bug was only in the database. For teams there was a bug in the DB, the check on backend side was missing and the frontend had the check but it was sending the request anyway. I fixed all these bugs