sekassel / stp-24-server-tracker

Issue Tracker and Feature Requests for the STP 2024 Server.
0 stars 0 forks source link

Game password does not get updated by patch game endpoint #4

Closed Baldi-OG closed 3 months ago

Baldi-OG commented 3 months ago

Describe the bug When testing our staging room we found out that even though we are getting a positive response from the server(No HTTP error what so ever, instead we got the expected Game Object) . The password would not get updated and it remained possible to join the game with the old password (New one does not work). To make sure our code was not causing the issue we recreated the process only using Swagger and still were not able to change the password

To Reproduce Steps to reproduce the behavior:

  1. Open 2 Swagger Tabs (put both of them next to each other, its way easier that way)
  2. Log into both on different account. We used my personal account on one and "string" on the other
  3. Verify they are correctly authorized (Get games for example)
  4. Create game with one account. Make sure started is set to false and put the password "123"
  5. Patch the game, by removing everything except for the password field (All fields are optional) and put the password as "1234"
  6. Verify getting a positive code 200 response
  7. Joining the game with the other account using password "123" ( Leave "traits" as an empty list and "color" as "#000"
  8. Verify using the get game members endpoint that you have in fact joined the game

Expected behavior It is expected that you could not join the game and would receive a code 403 "Incorrect password." error.

Additional context The new password also does not get recognized. Its use resulting in a 403 error instead.