From cb843b1a2b1a8aa86deebb9b03113ec05102335d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 17 Apr 2026 15:33:49 +0900 Subject: [PATCH] Limit maximum password length for multiplayer lobbies to conformant value (#37329) See https://github.com/ppy/osu/issues/37324. --- .../Multiplayer/Match/MultiplayerMatchSettingsOverlay.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerMatchSettingsOverlay.cs b/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerMatchSettingsOverlay.cs index 80179bd1dd..2faaec401e 100644 --- a/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerMatchSettingsOverlay.cs +++ b/osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerMatchSettingsOverlay.cs @@ -237,7 +237,13 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, - LengthLimit = 255, + // Set quite small to avoid hitting rich presence limits. + // Note that we use JSON encoding so this needs to be well below the 128 byte limit discord end. + // See https://github.com/Lachee/discord-rpc-csharp/blob/master/DiscordRPC/Entities/Secrets.cs#L26-L42 + // + // Note that we need at least 36 characters for tournament rooms: + // https://github.com/ppy/osu-server-spectator/blob/406ed09d5825f2fe60c9d5ca08e69db94d873e28/osu.Server.Spectator/Hubs/Referee/RefereeHub.cs#L101 + LengthLimit = 40, }, }, new Section("Other")