Obsessive Compulsive
-
Posts
85 -
Joined
-
Days Won
2
Content Type
Profiles
Forums
Store
Articles
A20 Bugs
A21 Bugs
Events
Record Comments posted by Obsessive Compulsive
-
-
This is affecting console commands AI Director Spawn Scouts, Buff Player, Debuff Player, Teleport Player, White List.
Also console commands Admin, Ban, Kick.
Maybe the more important thing is Net Package Game Event Request which is used for the twitch integration I believe. This is using this class and method to grab the Client Info which would cause an error if their name has an underscore in it.
One other thing I noticed is that due to checking the param as a possible player name last, it allows them to mimic another player by using their platform id or crossplatform id as the name. For example, if I changed my steam name to EOS_1a3b5c7a9b1c3a5b7c9a1b3c5a7b9c. I could then pretend to be someone else because it runs the platform id and crossplatform id check before the name check. The name should be checked against first and then the platform id.
In certain circumstances some server managers such as botman, csmm can also be calling on this as a short cut to grab client info but run in to this error if using a player name with an underscore in it.0 -
Sorry the fix is a bit more complicated than just the switch that I mentioned in the code. You need to check if the parameter contains one of the platform identifiers such as Local_ Steam_ or XBL_ before running it as a potential id because a player name with an underscore will trigger an error in it. Any improper identifier likely triggers this
0
New id system through the console using Class: ClientInfoCollection and Method: GetForNameOrId
in Under Review
Posted
I have seen some changes in this method with experimental but it did not solve the issue.
I am just going to copy pasta my fix for you.
ClientInfo clientInfo = null;
int entityId;
if (int.TryParse(_nameOrId, out entityId))
{
clientInfo = SingletonMonoBehaviour<ConnectionManager>.Instance.Clients.ForEntityId(_entityId);
if (clientInfo != null)
{
return clientInfo;
}
}
clientInfo = SingletonMonoBehaviour<ConnectionManager>.Instance.Clients.GetForPlayerName(_name);
if (clientInfo != null)
{
return clientInfo;
}
if (_nameOrId.Contains("Local_") || _nameOrId.Contains("EOS_") || _nameOrId.Contains("Steam_") || _nameOrId.Contains("XBL_") || _nameOrId.Contains("PSN_") || _nameOrId.Contains("EGS_"))
{
PlatformUserIdentifierAbs userIdentifier;
if (PlatformUserIdentifierAbs.TryFromCombinedString(_nameOrId, out userIdentifier))
{
clientInfo = PersistentOperations.GetClientInfoFromUId(userIdentifier);
if (clientInfo != null)
{
return clientInfo;
}
}
}