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.
|
# Authorization protocols version. All steamdid's of non-steams players will be changed in common with this value.
|
||||||
# 1: DProto (deprecated)
|
# 1: DProto (deprecated)
|
||||||
# 2: Reunion 2015-2018
|
# 2: Reunion 2015-2018
|
||||||
# 3: Reunion new (recommended)
|
# 3: Reunion 2018-2024
|
||||||
AuthVersion = 3
|
# 4: Reunion new (recommended)
|
||||||
|
AuthVersion = 4
|
||||||
|
|
||||||
# SteamIdHashSalt (string)
|
# SteamIdHashSalt (string)
|
||||||
# Salt string for SteamIDs hashing. Irreversibly changes SteamIDs. Prevents SteamID stealing.
|
# 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;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
// deprecated auth version reunion2015 has a truncated ticket buffer
|
|
||||||
size_t Reunion_AuthKeyMaxLen(authdata_t* authdata)
|
size_t Reunion_AuthKeyMaxLen(authdata_t* authdata)
|
||||||
{
|
{
|
||||||
const uint32_t MAX_RAWAUTHDATA_TRUNCATED = 16;
|
// deprecated auth version reunion2015/reunion2018 has a truncated ticket buffer
|
||||||
uint32_t authKeyMaxLen = (g_ReunionConfig->getAuthVersion() == av_reunion2015)
|
const uint32_t MAX_RAWAUTHDATA_2015_TRUNCATED = 16;
|
||||||
? min(authdata->authKeyLen, MAX_RAWAUTHDATA_TRUNCATED) : authdata->authKeyLen;
|
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)
|
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("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_INT("ServerInfoAnswerType", m_ServerAnswerType, server_answer_type, sat_source, sat_hybrid)
|
||||||
|
|
||||||
REU_CFG_PARSE_BOOL("SC2009_RevCompatMode", m_bSC2009RevEmuCompat)
|
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();
|
const client_id_gen_opts_t* idByIpGenOpts = g_ReunionConfig->getIdByIpGenOpts();
|
||||||
|
|
||||||
// use auth key type prefixes
|
// use auth key type prefixes
|
||||||
bool akPrefixes = g_ReunionConfig->getAuthVersion() == av_reunion2018;
|
bool akPrefixes = g_ReunionConfig->getAuthVersion() >= av_reunion2018;
|
||||||
|
|
||||||
switch (m_IdKind) {
|
switch (m_IdKind) {
|
||||||
case CI_REAL_STEAM:
|
case CI_REAL_STEAM:
|
||||||
|
@ -70,7 +70,8 @@ enum reuinon_log_mode {
|
|||||||
enum auth_version {
|
enum auth_version {
|
||||||
av_dproto = 1,
|
av_dproto = 1,
|
||||||
av_reunion2015 = 2,
|
av_reunion2015 = 2,
|
||||||
av_reunion2018 = 3
|
av_reunion2018 = 3,
|
||||||
|
av_reunion2024 = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
enum server_answer_type {
|
enum server_answer_type {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user