1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-07-07 08:14:58 +03:00

Remove obsolete hardcoded build number checks

The open-source project began with version 1.00, build 9022.

With the exception of an informative message fallback for builds older than 9428 (2014), all checks were for closed-source builds.
This commit is contained in:
Davide Beatrici
2021-06-27 07:21:06 +02:00
parent 56bb573b17
commit 4221579e95
11 changed files with 10 additions and 118 deletions

View File

@ -2385,23 +2385,6 @@ bool ServerAccept(CONNECTION *c)
goto CLEANUP;
}
if ((policy->NoSavePassword) || (policy->AutoDisconnect != 0))
{
if (c->ClientBuild < 6560 && InStrEx(c->ClientStr, "client", false))
{
// If NoSavePassword policy is specified,
// only supported client can connect
HLog(hub, "LH_CLIENT_VERSION_OLD", c->Name, c->ClientBuild, 6560);
Unlock(hub->lock);
ReleaseHub(hub);
c->Err = ERR_VERSION_INVALID;
error_detail = "ERR_VERSION_INVALID";
Free(policy);
goto CLEANUP;
}
}
if (user_expires != 0 && user_expires <= SystemTime64())
{
// User expired
@ -3217,7 +3200,7 @@ bool ServerAccept(CONNECTION *c)
#endif // OS_WIN32
tmp2 = ZeroMalloc(tmp2_size);
UniFormat(tmp2, tmp2_size, _UU(c->ClientBuild >= 9428 ? "NATT_MSG" : "NATT_MSG2"), local_name);
UniFormat(tmp2, tmp2_size, _UU("NATT_MSG"), local_name);
UniStrCat(tmp, tmpsize, tmp2);