From 16ccb84d3b59e9396e5fb13c20c99ec9cdaf8bcf Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Thu, 16 May 2024 22:25:26 +0700 Subject: [PATCH] Don't let through long nicknames --- .../kotlin/ru/dbotthepony/kstarbound/server/StarboundServer.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/ru/dbotthepony/kstarbound/server/StarboundServer.kt b/src/main/kotlin/ru/dbotthepony/kstarbound/server/StarboundServer.kt index 963c7d76..61418538 100644 --- a/src/main/kotlin/ru/dbotthepony/kstarbound/server/StarboundServer.kt +++ b/src/main/kotlin/ru/dbotthepony/kstarbound/server/StarboundServer.kt @@ -493,7 +493,7 @@ sealed class StarboundServer(val root: File) : BlockableEventLoop("Server thread synchronized(occupiedNicknames) { var name = name - if (name.lowercase() == "server" || name.isBlank()) { + if (name.lowercase() == "server" || name.isBlank() || name.length >= 32) { name = alternative }