From ed4d14521922f17d0aa1ae3d774fedd66fb1c222 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Wed, 27 Nov 2024 00:04:55 +0700 Subject: [PATCH] Fixed salt steamid for reunion2015 auth version --- reunion/src/client_auth.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reunion/src/client_auth.cpp b/reunion/src/client_auth.cpp index 870a1a0..129b59c 100644 --- a/reunion/src/client_auth.cpp +++ b/reunion/src/client_auth.cpp @@ -61,10 +61,15 @@ void SaltSteamId(authdata_t* authdata) { byte buf[MAX_HASHDATA_LEN]; CSizeBuf szbuf(buf, sizeof buf); + // deprecated auth version reunion2015 has a truncated ticket buffer + const uint32_t MAX_RAWAUTHDATA_TRUNC = 16; + uint32_t authKeyMaxLen = (g_ReunionConfig->getAuthVersion() == av_reunion2015) + ? MAX_RAWAUTHDATA_TRUNC : authdata->authKeyLen; + if (g_ReunionConfig->getAuthVersion() < av_reunion2018) szbuf.WriteLong(authdata->steamId); if (g_ReunionConfig->getAuthVersion() > av_dproto) - szbuf.Write(authdata->authKey, authdata->authKeyLen); + szbuf.Write(authdata->authKey, authKeyMaxLen); szbuf.Write(g_ReunionConfig->getSteamIdSalt(), g_ReunionConfig->getSteamIdSaltLen());