Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix authentication handling #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

rc4
Copy link

@rc4 rc4 commented Jun 22, 2022

Per the Valve Developer Wiki, the server will send an empty SERVERDATA_RESPONSE_VALUE packet before the SERVERDATA_AUTH_RESPONSE packet. This code adds handling for this empty packet so authentication succeeds from the module's perspective.

I'm not sure if all games that implement RCON behave this way or not - so we may want to make this an optional feature in the constructor for the object. I can, however, confirm that at least TF2 does work this way, and that my fix allows the library to communicate with my TF2 server.

Add handling of empty SERVERDATA_RESPONSE_VALUE packet before SERVERDATA_AUTH_RESPONSE packet
@rc4
Copy link
Author

rc4 commented Jun 22, 2022

Come to think of it, I was pretty sure I had used this module before I ran into this issue and was surprised it was no longer working - IIRC I used it to communicate with a Rust server that did not have Facepunch's websocket RCON protocol enabled. Unfortunately I no longer have a Rust server running to test with, but Facepunch has deprecated the source RCON protocol and plans to remove it from Rust, so I'm not sure if it's a big enough concern to work around. If anything, Rust would be in violation of the spec, not TF2/Valve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant