Fixed salt steamid for reunion2015 auth version

This commit is contained in:
s1lentq 2024-11-27 00:04:55 +07:00
parent c625203188
commit ed4d145219

View File

@ -61,10 +61,15 @@ void SaltSteamId(authdata_t* authdata) {
byte buf[MAX_HASHDATA_LEN]; byte buf[MAX_HASHDATA_LEN];
CSizeBuf szbuf(buf, sizeof buf); 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) if (g_ReunionConfig->getAuthVersion() < av_reunion2018)
szbuf.WriteLong(authdata->steamId); szbuf.WriteLong(authdata->steamId);
if (g_ReunionConfig->getAuthVersion() > av_dproto) 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()); szbuf.Write(g_ReunionConfig->getSteamIdSalt(), g_ReunionConfig->getSteamIdSaltLen());