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
This commit is contained in:
Joonas Rikkonen
2017-12-21 21:57:06 +02:00
parent 604fc65154
commit 4db708335a

View File

@@ -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())