Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplayer room creation flow succeeds when an online beatmap was locally modified #16176

Open
bdach opened this issue Dec 20, 2021 · 6 comments
Labels
area:multiplayer priority:2 Moderately important. Relied on by some users or impeding the usability of the game

Comments

@bdach
Copy link
Collaborator

bdach commented Dec 20, 2021

By which I mean the following scenario:

  1. Open multiplayer
  2. Select a beatmap that has an online ID, but was locally modified
  3. Click "create room", creation succeeds
  4. On entering the room, the playlist item will show a download button (even though the item was just chosen from the local collection)
  5. If you try to add/select the item again via "add/change item", spectator server will respond that the beatmap was modified

Kind of not sure where this should go really. Room creation is handled by web and the room creation request does not include the hash of the map, just its online ID. And so there's not much that can be done in spectator server because if the online ID is valid, then that looks as if the user just chose the unmodified map.

Plausible solutions:

  1. Move room creation to spectator server and add local check there
  2. Send beatmap checksums in room creation request and verify web-side
  3. Add a client-side check against the beatmap having an online ID but non-matching hash when compared with web
@smoogipoo
Copy link
Contributor

smoogipoo commented Dec 23, 2021

Not sure if this is an actual issue or whether the server should allow you to pick modified items via add/change too. So long as the server is authoritative on the hash.

@peppy
Copy link
Member

peppy commented Dec 23, 2021

If we're allowing modified, we need to support it fully (ie. the client should be aware that downloading the beatmap will not work, and not show the download button). Safest path for now is to not allow.

@smoogipoo
Copy link
Contributor

smoogipoo commented Dec 23, 2021

the client should be aware that downloading the beatmap will not work, and not show the download button

What do you mean by that? That's currently what happens - if you create a room with a beatmap that's been modified it'll show the download button and allow you to play it after redownloading.

@peppy
Copy link
Member

peppy commented Dec 23, 2021

The issue in this thread is the host creating a room with a modified beatmap. In which case, a user playing in the room would see the download button, download but would still be unable to play.

@smoogipoo
Copy link
Contributor

smoogipoo commented Dec 23, 2021

In which case, a user playing in the room would see the download button, download but would still be unable to play.

This is not the case - it will work after redownloading. When creating a room the hash isn't serialised at all, but the multiplayer server will populate the hash directly from the DB to give back to the clients (via MultiplayerPlaylistItem).

The difference is that when adding/changing an item, the hash is serialised, so the multiplayer server rejects it. I'm saying it could not and instead overwrite the hash sent from the client, and pass back the correct hash.

@peppy
Copy link
Member

peppy commented Dec 23, 2021

right, that's very hidden behaviour...

so this is just a UX issue then. probably want to allow the same thing when selecting a beatmap (that has an OnlineID) - server authoritative on the hash.

@peppy peppy added the priority:2 Moderately important. Relied on by some users or impeding the usability of the game label Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:multiplayer priority:2 Moderately important. Relied on by some users or impeding the usability of the game
Projects
None yet
Development

No branches or pull requests

3 participants