mirror of
https://github.com/ppy/osu.git
synced 2026-06-03 18:03:55 +08:00
Return empty strings rather than erroring
Preventing malicious actors from permanently destroying games via skins.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user