mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Warden: Add minimal verification of OS used by client for warden module loading
This commit is contained in:
@@ -857,6 +857,17 @@ int WorldSocket::HandleAuthSession(WorldPacket& recvPacket)
|
||||
uint32 recruiter = fields[9].GetUInt32();
|
||||
std::string os = fields[10].GetString();
|
||||
|
||||
// Must be done before WorldSession is created
|
||||
if (sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED) && os != "Win" && os != "OSX")
|
||||
{
|
||||
packet.Initialize(SMSG_AUTH_RESPONSE, 1);
|
||||
packet << uint8(AUTH_REJECT);
|
||||
SendPacket(packet);
|
||||
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WorldSocket::HandleAuthSession: Client %s attempted to log in using invalid client OS (%s).", GetRemoteAddress().c_str(), os.c_str());
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Checks gmlevel per Realm
|
||||
stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_GMLEVEL_BY_REALMID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user