1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-23 16:27:20 +08:00

Return empty strings rather than erroring

Preventing malicious actors from permanently destroying games via skins.
This commit is contained in:
Dan Balasescu 2024-10-18 17:17:57 +09:00
parent 2de5e3392e
commit e27aa0c761
No known key found for this signature in database

View File

@ -132,7 +132,7 @@ namespace osu.Game.Skinning.Components
return BeatmapsetsStrings.ShowStatsBpm;
default:
throw new ArgumentOutOfRangeException(nameof(attribute), attribute, $@"Unrecognised {nameof(BeatmapAttribute)}");
return string.Empty;
}
}
@ -180,7 +180,7 @@ namespace osu.Game.Skinning.Components
return beatmap.Value.BeatmapInfo.StarRating.ToLocalisableString(@"F2");
default:
throw new ArgumentOutOfRangeException(nameof(attribute), attribute, $@"Unrecognised {nameof(BeatmapAttribute)}");
return string.Empty;
}
}