mirror of
https://github.com/rehlds/reunion.git
synced 2025-08-02 10:31:35 +03:00
fixed compat with reunion2018 version (0.1.0.137)
note: use AuthVersion = 4 for reunion v2.0 and newer
This commit is contained in:
parent
0dd33dd0e3
commit
874e76808b
5
reunion/dist/reunion.cfg
vendored
5
reunion/dist/reunion.cfg
vendored
@ -85,8 +85,9 @@ cid_SXEI = 1
|
||||
# Authorization protocols version. All steamdid's of non-steams players will be changed in common with this value.
|
||||
# 1: DProto (deprecated)
|
||||
# 2: Reunion 2015-2018
|
||||
# 3: Reunion new (recommended)
|
||||
AuthVersion = 3
|
||||
# 3: Reunion 2018-2024
|
||||
# 4: Reunion new (recommended)
|
||||
AuthVersion = 4
|
||||
|
||||
# SteamIdHashSalt (string)
|
||||
# Salt string for SteamIDs hashing. Irreversibly changes SteamIDs. Prevents SteamID stealing.
|
||||
|
@ -48,14 +48,23 @@ static uint32_t revHash(const char* str, int n = -1)
|
||||
return hash;
|
||||
}
|
||||
|
||||
// deprecated auth version reunion2015 has a truncated ticket buffer
|
||||
size_t Reunion_AuthKeyMaxLen(authdata_t* authdata)
|
||||
{
|
||||
const uint32_t MAX_RAWAUTHDATA_TRUNCATED = 16;
|
||||
uint32_t authKeyMaxLen = (g_ReunionConfig->getAuthVersion() == av_reunion2015)
|
||||
? min(authdata->authKeyLen, MAX_RAWAUTHDATA_TRUNCATED) : authdata->authKeyLen;
|
||||
// deprecated auth version reunion2015/reunion2018 has a truncated ticket buffer
|
||||
const uint32_t MAX_RAWAUTHDATA_2015_TRUNCATED = 16;
|
||||
const uint32_t MAX_RAWAUTHDATA_2018_TRUNCATED = 31;
|
||||
|
||||
return authKeyMaxLen;
|
||||
switch (g_ReunionConfig->getAuthVersion())
|
||||
{
|
||||
case av_reunion2015:
|
||||
return min(authdata->authKeyLen, MAX_RAWAUTHDATA_2015_TRUNCATED);
|
||||
case av_reunion2018:
|
||||
return min(authdata->authKeyLen, MAX_RAWAUTHDATA_2018_TRUNCATED);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return authdata->authKeyLen;
|
||||
}
|
||||
|
||||
void RevEmuFinishAuthorization(authdata_t* authdata, const char* authStr, size_t authKeyMaxLen, bool stripSpecialChars)
|
||||
|
@ -271,7 +271,7 @@ bool CReunionConfig::parseCfgParam()
|
||||
|
||||
REU_CFG_PARSE_INT("LoggingMode", m_LogMode, int, rl_none, (rl_console|rl_logfile))
|
||||
|
||||
REU_CFG_PARSE_INT("AuthVersion", m_AuthVersion, auth_version, av_dproto, av_reunion2018)
|
||||
REU_CFG_PARSE_INT("AuthVersion", m_AuthVersion, auth_version, av_dproto, av_reunion2024)
|
||||
REU_CFG_PARSE_INT("ServerInfoAnswerType", m_ServerAnswerType, server_answer_type, sat_source, sat_hybrid)
|
||||
|
||||
REU_CFG_PARSE_BOOL("SC2009_RevCompatMode", m_bSC2009RevEmuCompat)
|
||||
|
@ -52,7 +52,7 @@ void CReunionPlayer::authenticated(int proto, client_id_kind idkind, client_auth
|
||||
const client_id_gen_opts_t* idByIpGenOpts = g_ReunionConfig->getIdByIpGenOpts();
|
||||
|
||||
// use auth key type prefixes
|
||||
bool akPrefixes = g_ReunionConfig->getAuthVersion() == av_reunion2018;
|
||||
bool akPrefixes = g_ReunionConfig->getAuthVersion() >= av_reunion2018;
|
||||
|
||||
switch (m_IdKind) {
|
||||
case CI_REAL_STEAM:
|
||||
|
@ -70,7 +70,8 @@ enum reuinon_log_mode {
|
||||
enum auth_version {
|
||||
av_dproto = 1,
|
||||
av_reunion2015 = 2,
|
||||
av_reunion2018 = 3
|
||||
av_reunion2018 = 3,
|
||||
av_reunion2024 = 4
|
||||
};
|
||||
|
||||
enum server_answer_type {
|
||||
|
Loading…
x
Reference in New Issue
Block a user