Skip to content

Commit cb843b1

Browse files
authored
Limit maximum password length for multiplayer lobbies to conformant value (ppy#37329)
See ppy#37324.
1 parent 964d3fb commit cb843b1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

osu.Game/Screens/OnlinePlay/Multiplayer/Match/MultiplayerMatchSettingsOverlay.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,13 @@ private void load(OverlayColourProvider colourProvider, OsuColour colours)
237237
{
238238
RelativeSizeAxes = Axes.X,
239239
TabbableContentContainer = this,
240-
LengthLimit = 255,
240+
// Set quite small to avoid hitting rich presence limits.
241+
// Note that we use JSON encoding so this needs to be well below the 128 byte limit discord end.
242+
// See https://github.com/Lachee/discord-rpc-csharp/blob/master/DiscordRPC/Entities/Secrets.cs#L26-L42
243+
//
244+
// Note that we need at least 36 characters for tournament rooms:
245+
// https://github.com/ppy/osu-server-spectator/blob/406ed09d5825f2fe60c9d5ca08e69db94d873e28/osu.Server.Spectator/Hubs/Referee/RefereeHub.cs#L101
246+
LengthLimit = 40,
241247
},
242248
},
243249
new Section("Other")

0 commit comments

Comments
 (0)