From 4db708335a77d7cdb4d66ba94e7896021453e201 Mon Sep 17 00:00:00 2001 From: Joonas Rikkonen Date: Thu, 21 Dec 2017 21:57:06 +0200 Subject: [PATCH] Readded homoglyph comparisons to client name checking during login (i.e. similar name checks can't be bypassed by using similar-looking characters). Looks like this got removed due to a messed up merge 5bdb57b Closes #182 --- .../BarotraumaShared/Source/Networking/GameServerLogin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Barotrauma/BarotraumaShared/Source/Networking/GameServerLogin.cs b/Barotrauma/BarotraumaShared/Source/Networking/GameServerLogin.cs index f0b4d65e4..c40d8f9d3 100644 --- a/Barotrauma/BarotraumaShared/Source/Networking/GameServerLogin.cs +++ b/Barotrauma/BarotraumaShared/Source/Networking/GameServerLogin.cs @@ -179,7 +179,7 @@ namespace Barotrauma.Networking DebugConsole.NewMessage(clName + " (" + inc.SenderConnection.RemoteEndPoint.Address.ToString() + ") couldn't join the server (name taken by the server)", Color.Red); return; } - Client nameTaken = ConnectedClients.Find(c => c.Name.ToLower() == clName.ToLower()); + Client nameTaken = ConnectedClients.Find(c => Homoglyphs.Compare(c.Name.ToLower(), clName.ToLower())); if (nameTaken != null) { if (nameTaken.Connection.RemoteEndPoint.Address.ToString() == inc.SenderEndPoint.Address.ToString())