sbpp / sourcebans-pp

Admin, ban, and comms management system for the Source engine
https://sbpp.github.io/
Creative Commons Attribution Share Alike 4.0 International
338 stars 173 forks source link

No support for a2s challenge - Update SourceQuery include #734

Closed JoinedSenses closed 3 years ago

JoinedSenses commented 3 years ago

Update SourceQuery to fix issues with the new a2s challenge that has been added to srcds.

https://github.com/xPaw/PHP-Source-Query/blob/cd3624704ebd2ef6f6b21cb139e3b82a9e866147/SourceQuery/SourceQuery.php

Probably fixes #733

Info here: https://developer.valvesoftware.com/wiki/Server_queries#A2S_INFO https://steamcommunity.com/discussions/forum/14/2974028351344359625/

Servers can now 'challenge' a2s queries, requiring an additional response with the 4 byte challenge added to the end of the query. This breaks sourcebans because the outdated SourceQuery doesn't handle challenges.

Example: you send FF FF FF FF 54 "Source Engine Query\0" the server responds back: FF FF FF FF 41 (4 byte challenge here) then you have to reply FF FF FF FF 54 "Source Engine Query\0" (4 byte challenge) server then provides requested info

What are the steps to reproduce this issue?

  1. Install sbpp
  2. Set EnvVar STEAM_GAMESERVER_A2S_INFO_REQUIRE_CHALLENGE=1
  3. Reboot game server(s)
  4. Check sourcebans page and notice it doesnt receive info from servers. (It didn't respond to the a2s challenge)

What happens?

Server info doesnt show on sb web if STEAM_GAMESERVER_A2S_INFO_REQUIRE_CHALLENGE env var set to 1 for server(s)

What were you expecting to happen?

Server info should show lol

Any logs, error output, etc.?

Any other comments?

Update SourceQuery

What versions of software are you using?

Operating System: SourceBans++ Version: SourceMod Version: MetaMod Version:

ghost commented 3 years ago

Hello, this new source-query patch is now applied for Left 4 dead 2 few days ago too for Linux and Windows and Sourcebans needs an update to fix the connection to the game server.

xLeviNx commented 3 years ago

https://github.com/MisterDr/SourceBansDark

This gentlemen may have found a patch.

JoinedSenses commented 3 years ago

https://github.com/MisterDr/SourceBansDark

This gentlemen may have found a patch.

The fix is to just update sourcequery in the repo. Literally copy paste.