1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-17 10:02:55 +08:00
Commit Graph

13 Commits

Author SHA1 Message Date
Bartłomiej Dach
7e3564cb4a
Bring back matching by filename when performing online metadata lookups 2024-10-30 10:25:20 +01:00
Bartłomiej Dach
776fabd77c
Only use MD5 when performing metadata lookups
Both online and offline using the cache.

The rationale behind this change is that in the current state of
affairs, `TestPartiallyMaliciousSet()` fails in a way that cannot be
reconciled without this sort of change.

The test exercises a scenario where the beatmap being imported has an
online ID in the `.osu` file, but its hash does not match the online
hash of the beatmap. This turns out to be a more frequent scenario than
envisioned because of users doing stupid things with manual file editing
rather than reporting issues properly.

The scenario is realistic only because the behaviour of the endpoint
responsible for looking up beatmaps is such that if multiple parameters
are given (e.g. all three of beatmap MD5, online ID, and filename), it
will try the three in succession:

	f6b341813b/app/Http/Controllers/BeatmapsController.php (L260-L266)

and the local metadata cache implementation reflected this
implementation.

Because online ID and filename are inherently unreliable in this
scenario due to being directly manipulable by clueless or malicious
users, neither should not be used as a fallback.
2024-10-30 08:12:30 +01:00
Dan Balasescu
1811647e34 Make room requests handler handle GetBeatmapRequest 2022-09-27 20:30:41 +09:00
Dan Balasescu
f8830c6850 Automated #nullable processing 2022-06-17 16:37:17 +09:00
Dean Herbert
dad5b06e84 Avoid sending empty parameters in GetBeatmapRequest 2021-12-03 16:23:39 +09:00
Dean Herbert
d7ac94038a Update GetBeatmapRequest to use AddParameter 2021-10-26 12:05:31 +09:00
Dean Herbert
67ef1c40e6 Allow API beatmap requests using interface type 2021-10-25 15:59:40 +09:00
Dean Herbert
ec61c3c5ee Rename all remaining cases 2021-10-03 00:55:29 +09:00
Dean Herbert
65d71b9442 Fix beatmap lookups failing for beatmaps with no local path
Turns out the underlying EscapeUriString doesn't like nulls
2019-11-23 20:55:42 +09:00
Dean Herbert
f079ebe857 Simplify beatmap lookup to use a single endpoint 2019-11-22 16:13:48 +09:00
Dean Herbert
8617aaa2a7 Update licence header (and remove year) 2019-01-24 17:43:03 +09:00
Dean Herbert
e8455dc1e4 Fix incorrect hash usage 2018-06-08 14:38:04 +09:00
Dean Herbert
d1e9dba4aa Move beatmap lookup ability to new request 2018-06-08 12:21:12 +09:00