diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/bnetserver/Server/Session.cpp | 2 | ||||
-rw-r--r-- | src/server/game/Server/WorldSocket.cpp | 4 | ||||
-rw-r--r-- | src/server/shared/Realm/RealmList.cpp | 8 | ||||
-rw-r--r-- | src/server/shared/Realm/RealmList.h | 1 |
4 files changed, 12 insertions, 3 deletions
diff --git a/src/server/bnetserver/Server/Session.cpp b/src/server/bnetserver/Server/Session.cpp index 46fd1d1479a..c3aaa972160 100644 --- a/src/server/bnetserver/Server/Session.cpp +++ b/src/server/bnetserver/Server/Session.cpp @@ -219,7 +219,7 @@ uint32 Battlenet::Session::HandleLogon(authentication::v1::LogonRequest const* l return ERROR_BAD_PROGRAM; } - if (logonRequest->platform() != "Win" && logonRequest->platform() != "Wn64" && logonRequest->platform() != "Mc64") + if (logonRequest->platform() != "Win" && logonRequest->platform() != "Wn64" && logonRequest->platform() != "Mc64" && logonRequest->platform() != "MacA") { TC_LOG_DEBUG("session", "[Battlenet::LogonRequest] {} attempted to log in from an unsupported platform (using {})!", GetClientInfo(), logonRequest->platform()); return ERROR_BAD_PLATFORM; diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 68783a321ae..f583c488367 100644 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -713,6 +713,8 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<WorldPackets::Auth:: digestKeyHash.UpdateData(buildInfo->Win64AuthSeed.data(), buildInfo->Win64AuthSeed.size()); else if (account.Game.OS == "Mc64") digestKeyHash.UpdateData(buildInfo->Mac64AuthSeed.data(), buildInfo->Mac64AuthSeed.size()); + else if (account.Game.OS == "MacA") + digestKeyHash.UpdateData(buildInfo->MacArmAuthSeed.data(), buildInfo->MacArmAuthSeed.size()); digestKeyHash.Finalize(); @@ -790,7 +792,7 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<WorldPackets::Auth:: // Must be done before WorldSession is created bool wardenActive = sWorld->getBoolConfig(CONFIG_WARDEN_ENABLED); - if (wardenActive && account.Game.OS != "Win" && account.Game.OS != "Wn64" && account.Game.OS != "Mc64") + if (wardenActive && account.Game.OS != "Win" && account.Game.OS != "Wn64" && account.Game.OS != "Mc64" && account.Game.OS != "MacA") { SendAuthResponseError(ERROR_DENIED); TC_LOG_ERROR("network", "WorldSocket::HandleAuthSession: Client {} attempted to log in using invalid client OS ({}).", address, account.Game.OS); diff --git a/src/server/shared/Realm/RealmList.cpp b/src/server/shared/Realm/RealmList.cpp index 2568a859f88..fd1e6e3a165 100644 --- a/src/server/shared/Realm/RealmList.cpp +++ b/src/server/shared/Realm/RealmList.cpp @@ -82,7 +82,7 @@ void RealmList::Close() void RealmList::LoadBuildInfo() { // 0 1 2 3 4 5 6 - if (QueryResult result = LoginDatabase.Query("SELECT majorVersion, minorVersion, bugfixVersion, hotfixVersion, build, win64AuthSeed, mac64AuthSeed FROM build_info ORDER BY build ASC")) + if (QueryResult result = LoginDatabase.Query("SELECT majorVersion, minorVersion, bugfixVersion, hotfixVersion, build, win64AuthSeed, mac64AuthSeed, macArmAuthSeed FROM build_info ORDER BY build ASC")) { do { @@ -111,6 +111,12 @@ void RealmList::LoadBuildInfo() else build.Mac64AuthSeed = { }; + std::string macArmAuthSeedHexStr = fields[7].GetString(); + if (macArmAuthSeedHexStr.length() == build.MacArmAuthSeed.size() * 2) + HexStrToByteArray(macArmAuthSeedHexStr, build.MacArmAuthSeed); + else + build.MacArmAuthSeed = { }; + } while (result->NextRow()); } } diff --git a/src/server/shared/Realm/RealmList.h b/src/server/shared/Realm/RealmList.h index 3cbbb97c316..b61ad502877 100644 --- a/src/server/shared/Realm/RealmList.h +++ b/src/server/shared/Realm/RealmList.h @@ -38,6 +38,7 @@ struct RealmBuildInfo std::array<char, 4> HotfixVersion; std::array<uint8, 16> Win64AuthSeed; std::array<uint8, 16> Mac64AuthSeed; + std::array<uint8, 16> MacArmAuthSeed; }; namespace bgs::protocol::game_utilities::v1 |