Skip to content

Conversation

@bdach
Copy link
Collaborator

@bdach bdach commented Jan 31, 2025

This is more or less a direct revert of #23362. That was supposed to be a quick fixup of an exploitable situation, that sort of outlived its usefulness.

The reason why I'm coming back to it now out of all times is that... I need this gone for BSS. For beatmaps that are actively being worked on, stripping out the online IDs every time the beatmap set is saved means that a submitted beatmap just... cannot be updated by the creator anymore.

Since that initial PR mentioned above, we've tightened down checks extensively via means of changes such as:

After making this change I've red-teamed a few ways I could think of wherein I could modify a beatmap and checking whether things still behave as expected, and I was not able to produce a scenario affecting an .osu file that would result in a bogus score submission.

However, note that all of these checks pertain to the MD5 of the .osu file only and do nothing for things like swapping backgrounds or audio. Whether they should, is up for debate; #31745 is relevant here in that extent.

This also incidentally fixes #27783 which regressed at some point because the string changed osu-web side. Probably wasn't noticed by anyone because this was probably not hittable by anyone without some major shenanigans before this change.

@bdach bdach added area:online functionality Deals with online fetching / sending but don't change much on a surface UI level. area:editor labels Jan 31, 2025
@bdach bdach self-assigned this Jan 31, 2025
break;

case @"invalid beatmap_hash":
case @"invalid or missing beatmap_hash":
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peppy peppy merged commit f65be00 into ppy:master Feb 2, 2025
10 checks passed
@bdach bdach deleted the do-not-reset-online-info-on-save branch February 3, 2025 07:14
bdach added a commit to bdach/osu that referenced this pull request Mar 26, 2025
Noticed during review of ppy#32571.

The reproduction scenario is as follows:

1. Download beatmap used in daily challenge
2. Go to editor and modify it
3. Go to daily challenge, wherein the availability tracker will notice
   the MD5 mismatch, block the button, and require a redownload
4. Redownload the beatmap
5. Start gameplay
6. Gameplay start will fail due to web not issuing a submission token
   because the attempt to start gameplay ended up using the modified
   version of the map from step (2) rather than the redownloaded
   original from step (4).

Thankfully, due to (6), this is not exploitable, but nevertheless pretty
bad.

Probably regressed somewhere around
ppy#31747 actually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:editor area:online functionality Deals with online fetching / sending but don't change much on a surface UI level. size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't update beatmaps once they get locally modified.

2 participants