mirror of
https://github.com/rehlds/reunion.git
synced 2024-12-25 05:45:29 +03:00
Allow to disable salt for SteamIDs hashing >= reunion2018 (this is always required by default)
This commit is contained in:
parent
ed4d145219
commit
16c8b2621b
3
reunion/dist/reunion.cfg
vendored
3
reunion/dist/reunion.cfg
vendored
@ -94,7 +94,8 @@ AuthVersion = 3
|
||||
# AuthVersion < 3: If string is empty, hashing is not applied
|
||||
# AuthVersion >= 3: If string is empty, init will be failed
|
||||
# Recommended length is more than 31 chars
|
||||
SteamIdHashSalt =
|
||||
# Specify 0 to explicitly disable hashing (not recommended)
|
||||
SteamIdHashSalt =
|
||||
|
||||
# SC2009_RevCompatMode (0 / 1)
|
||||
# Enable fix to make steamids generated for SC2009 compatible with revEmu. Can't be disabled with AuthVersion >= 3.
|
||||
|
@ -319,8 +319,15 @@ bool CReunionConfig::parseCfgParam()
|
||||
if (m_AuthVersion == av_dproto)
|
||||
m_bEnableGenPrefix2 = false;
|
||||
|
||||
if (m_AuthVersion >= av_reunion2018) {
|
||||
if (m_SteamIdHashSaltLen < 16) {
|
||||
if (m_AuthVersion >= av_reunion2018)
|
||||
{
|
||||
// check logical negation value to disable salt hashing
|
||||
bool bSteamIdNoHashSalt = (m_SteamIdHashSalt[0] == '0'
|
||||
|| !Q_stricmp(m_SteamIdHashSalt, "no")
|
||||
|| !Q_stricmp(m_SteamIdHashSalt, "false"));
|
||||
|
||||
if (!bSteamIdNoHashSalt && m_SteamIdHashSaltLen < 16)
|
||||
{
|
||||
LCPrintf(true, "SteamIdHashSalt is not set or too short\n");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user