MarechJ / hll_rcon_tool

Hell Let Loose Community RCON, CRCON for short. An alternative rcon client for HLL. It is a web application with many features, historical data, statistics, discord integrations, etc
MIT License
98 stars 68 forks source link

[get_team_view_fast] Fails for player name with trailing whitespaces (assumption for now) #116

Open FlorianSW opened 2 years ago

FlorianSW commented 2 years ago

I actually do not know if the trailing whitespaces are the real issue here, however, the following error popped up in our logs for an otherwise legitimate looking player:

[2022-07-18 20:34:42,907][ERROR] rcon.commands commands.py:wrap:59 | Auto retrying _request ('playerinfo  Showa ',) {'can_fail': False}
Traceback (most recent call last):
  File "/code/rcon/commands.py", line 54, in wrap
    return method(self, *args, **kwargs)
  File "/code/rcon/commands.py", line 126, in _request
    raise HLLServerError(f"Got FAIL for {command}")
rcon.commands.HLLServerError: Got FAIL for playerinfo  Showa 
[2022-07-18 20:34:42,948][WARNING] rcon.commands commands.py:_reconnect:95 | reconnecting
[2022-07-18 20:34:45,099][ERROR] rcon.extended_commands extended_commands.py:get_team_view_fast:237 | Failed to get info for {'name': ' Showa ', 'steam_id_64': '765xxxxxxxxxxxxxx', 'steam_bans': {'CommunityBanned': False, 'VACBanned': False, 'NumberOfVACBans': 0, 'DaysSinceLastBan': 0, 'NumberOfGameBans': 0, 'EconomyBan': 'none', 'has_bans': False}, 'country': 'DE'}
Traceback (most recent call last):
  File "/code/rcon/commands.py", line 54, in wrap
    return method(self, *args, **kwargs)
  File "/code/rcon/commands.py", line 126, in _request
    raise HLLServerError(f"Got FAIL for {command}")
rcon.commands.HLLServerError: Got FAIL for playerinfo  Showa 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/code/rcon/extended_commands.py", line 235, in get_team_view_fast
    player_data = future.result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 437, in result
    return self.__get_result()
  File "/usr/local/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/code/rcon/cache_utils.py", line 146, in wrapper
    return cached_func(*args, **kwargs)
  File "/code/rcon/cache_utils.py", line 72, in __call__
    val = self.function(*args, **kwargs)
  File "/code/rcon/extended_commands.py", line 362, in get_detailed_player_info
    raw = super().get_player_info(player)
  File "/code/rcon/commands.py", line 236, in get_player_info
    data = self._request(f"playerinfo {player}", can_fail=can_fail)
  File "/code/rcon/commands.py", line 62, in wrap
    return method(self, *args, **kwargs)
  File "/code/rcon/commands.py", line 126, in _request
    raise HLLServerError(f"Got FAIL for {command}")
rcon.commands.HLLServerError: Got FAIL for playerinfo  Showa 

I can provide the actual steam ID if that would be of help, however, I'm not comfortable sharing that here publicly :)

FlorianSW commented 2 years ago

It actually isn't that easy to add trailing whitespaces to the your player name anymore. It looks like Steam added some additional validation here and simply strips away the whitespaces. So this player I mentioned probably has some old name set, still.

However, as we had the same issue just yesterday again, but with another name, I was able to reproduce. As some background: the players name is [NSK] | desp3rado | vi'D, however, as the name in HLL seems to have a different length limit then in Steam, it is currently stripped to be [NSK] | desp3rado | and it shows up like that in the RCon. However, when executing playerinfo [NSK] | desp3rado | returns with a FAIL:

Got FAIL for playerinfo [NSK] | desp3rado | 

Using the "official" RCon tool provided by the GSP returns FAIL as well :/ So this really looks a bit more like a game server side RCon issue.

FlorianSW commented 2 years ago

Update: I got the response from Team17, that this issue with trailing whitespaces should be fixed with the next update. I'll wait for it to verify that afterwards. I did not get any more info, yet, on how this is fixed (like either the whitespace needs to be there, should be removed (trim), or if the name should be quoted. Let's see 😅)

MarechJ commented 2 years ago

Good stuff. Thanks for the follow up with T17

On Sat, 27 Aug 2022 at 16:36, Florian @.***> wrote:

Update: I got the response from Team17, that this issue with trailing whitespaces should be fixed with the next update. I'll wait for it to verify that afterwards. I did not get any more info, yet, on how this is fixed (like either the whitespace needs to be there, should be removed (trim), or if the name should be quoted. Let's see 😅)

— Reply to this email directly, view it on GitHub https://github.com/MarechJ/hll_rcon_tool/issues/116#issuecomment-1229204396, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABB5JQD3PXNVRANZBLYSPIDV3IRVRANCNFSM5354XN3Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

FlorianSW commented 1 year ago

Just checked this again and.. what should I say: It is still the same behavior as before U13 🤷 I'll get in touch with T17 again to find out what they actually tried to fix and how.

MarechJ commented 1 year ago

Thanks for following up. it's quite annoying indeed, to have that 1% of failure especially in the automoderation. We could potentially make those guys immune but that may lead to abuses / bypasses.

And for stats gather, well, we're just screwed.

FlorianSW commented 1 year ago

Just for your interest: U14 did not fix this issue 🤷

ElGuillermo commented 10 months ago

As we still can't rely on a fix from game developers, we may try to change CRCON behavior. Please give some advice on my suggestion here : https://github.com/MarechJ/hll_rcon_tool/issues/249

ElGuillermo commented 9 months ago

CRCON v9.1.0 introduces the option to warn/kick these bad profile players when they join.

FlorianSW commented 9 months ago

I would really like to keep this issue open as a reminder to check this from time to time, if the underlying issue is fixed by T17. Right now, anything that we implemented is an ugly workaround only :)