From 90c53e8c84b6a7b4346bda8087be8d14d0902d1a Mon Sep 17 00:00:00 2001 From: DDuarte Date: Mon, 10 Nov 2014 20:57:39 +0000 Subject: [PATCH] Core: Nuke authserver It has been replaced by bnetserver since grunt was deprecated --- cmake/options.cmake | 2 +- cmake/showoptions.cmake | 2 +- contrib/conf_merge/README | 2 +- doc/UnixInstall.txt | 2 +- src/server/CMakeLists.txt | 1 - .../authserver/Authentication/AuthCodes.cpp | 87 -- .../authserver/Authentication/AuthCodes.h | 132 --- src/server/authserver/Authentication/TOTP.cpp | 95 -- src/server/authserver/Authentication/TOTP.h | 29 - src/server/authserver/CMakeLists.txt | 112 --- src/server/authserver/Main.cpp | 233 ----- .../authserver/PrecompiledHeaders/authPCH.cpp | 1 - .../authserver/PrecompiledHeaders/authPCH.h | 7 - src/server/authserver/Realms/RealmList.cpp | 188 ---- src/server/authserver/Realms/RealmList.h | 99 -- src/server/authserver/Server/AuthSession.cpp | 902 ------------------ src/server/authserver/Server/AuthSession.h | 96 -- src/server/authserver/Server/AuthSocketMgr.h | 61 -- src/server/authserver/authserver.conf.dist | 250 ----- src/server/authserver/authserver.ico | Bin 136606 -> 0 bytes src/server/authserver/authserver.rc | 94 -- src/server/authserver/resource.h | 15 - src/server/bnetserver/bnetserver.conf.dist | 4 +- src/server/scripts/Commands/cs_account.cpp | 2 +- .../scripts/Commands/cs_battlenet_account.cpp | 2 +- src/server/shared/CMakeLists.txt | 2 +- src/server/shared/Configuration/Config.h | 2 +- src/server/worldserver/CMakeLists.txt | 4 +- src/server/worldserver/worldserver.conf.dist | 2 +- 29 files changed, 13 insertions(+), 2415 deletions(-) delete mode 100644 src/server/authserver/Authentication/AuthCodes.cpp delete mode 100644 src/server/authserver/Authentication/AuthCodes.h delete mode 100644 src/server/authserver/Authentication/TOTP.cpp delete mode 100644 src/server/authserver/Authentication/TOTP.h delete mode 100644 src/server/authserver/CMakeLists.txt delete mode 100644 src/server/authserver/Main.cpp delete mode 100644 src/server/authserver/PrecompiledHeaders/authPCH.cpp delete mode 100644 src/server/authserver/PrecompiledHeaders/authPCH.h delete mode 100644 src/server/authserver/Realms/RealmList.cpp delete mode 100644 src/server/authserver/Realms/RealmList.h delete mode 100644 src/server/authserver/Server/AuthSession.cpp delete mode 100644 src/server/authserver/Server/AuthSession.h delete mode 100644 src/server/authserver/Server/AuthSocketMgr.h delete mode 100644 src/server/authserver/authserver.conf.dist delete mode 100644 src/server/authserver/authserver.ico delete mode 100644 src/server/authserver/authserver.rc delete mode 100644 src/server/authserver/resource.h diff --git a/cmake/options.cmake b/cmake/options.cmake index d4fc2f3b2d..3002658a72 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -8,7 +8,7 @@ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -option(SERVERS "Build worldserver and authserver" 1) +option(SERVERS "Build worldserver and bnetserver" 1) option(SCRIPTS "Build core with scripts included" 1) option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 0) option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1) diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake index ea4820a01f..44d161cab8 100644 --- a/cmake/showoptions.cmake +++ b/cmake/showoptions.cmake @@ -20,7 +20,7 @@ message("") if( SERVERS ) message("* Build world/auth : Yes (default)") else() - message("* Build world/authserver : No") + message("* Build world/bnetserver : No") endif() if( SCRIPTS ) diff --git a/contrib/conf_merge/README b/contrib/conf_merge/README index 974c106306..9e6b1e1546 100644 --- a/contrib/conf_merge/README +++ b/contrib/conf_merge/README @@ -1,6 +1,6 @@ ==== PHP merger (index.php + merge.php) ==== -This is a PHP script for merging a new .dist file with your existing .conf file (worldserver.conf.dist and authserver.conf.dist) +This is a PHP script for merging a new .dist file with your existing .conf file (worldserver.conf.dist and bnetserver.conf.dist) It should also work with mangos dist/conf files as well. It uses sessions so it is multi user safe, it adds any options that are removed to the bottom of the file, diff --git a/doc/UnixInstall.txt b/doc/UnixInstall.txt index 94b25c5835..043994c856 100644 --- a/doc/UnixInstall.txt +++ b/doc/UnixInstall.txt @@ -49,7 +49,7 @@ than where to install using flags built into our cmake files. Just open up CMakeLists.txt in the main folder and take a look at some of the flags like - SERVERS Build worldserver and authserver + SERVERS Build worldserver and bnetserver SCRIPTS Build core with scripts included TOOLS Build map/vmap extraction/assembler tools USE_SCRIPTPCH Use precompiled headers when compiling scripts diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index e691b9527a..6997fd6e14 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -24,7 +24,6 @@ if( SERVERS ) add_subdirectory(shared) add_subdirectory(game) add_subdirectory(collision) - add_subdirectory(authserver) add_subdirectory(ipc) add_subdirectory(bnetserver) add_subdirectory(scripts) diff --git a/src/server/authserver/Authentication/AuthCodes.cpp b/src/server/authserver/Authentication/AuthCodes.cpp deleted file mode 100644 index 44921f6a1c..0000000000 --- a/src/server/authserver/Authentication/AuthCodes.cpp +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (C) 2008-2014 TrinityCore - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#include "AuthCodes.h" -#include - -namespace AuthHelper -{ - static RealmBuildInfo const PostBcAcceptedClientBuilds[] = - { - {15595, 4, 3, 4, ' '}, - {14545, 4, 2, 2, ' '}, - {13623, 4, 0, 6, 'a'}, - {13930, 3, 3, 5, 'a'}, // 3.3.5a China Mainland build - {12340, 3, 3, 5, 'a'}, - {11723, 3, 3, 3, 'a'}, - {11403, 3, 3, 2, ' '}, - {11159, 3, 3, 0, 'a'}, - {10505, 3, 2, 2, 'a'}, - {9947, 3, 1, 3, ' '}, - {8606, 2, 4, 3, ' '}, - {0, 0, 0, 0, ' '} // terminator - }; - - static RealmBuildInfo const PreBcAcceptedClientBuilds[] = - { - {6141, 1, 12, 3, ' '}, - {6005, 1, 12, 2, ' '}, - {5875, 1, 12, 1, ' '}, - {0, 0, 0, 0, ' '} // terminator - }; - - bool IsPreBCAcceptedClientBuild(int build) - { - for (int i = 0; PreBcAcceptedClientBuilds[i].Build; ++i) - if (PreBcAcceptedClientBuilds[i].Build == build) - return true; - - return false; - } - - bool IsPostBCAcceptedClientBuild(int build) - { - for (int i = 0; PostBcAcceptedClientBuilds[i].Build; ++i) - if (PostBcAcceptedClientBuilds[i].Build == build) - return true; - - return false; - } - - bool IsAcceptedClientBuild(int build) - { - return (IsPostBCAcceptedClientBuild(build) || IsPreBCAcceptedClientBuild(build)); - } - - RealmBuildInfo const* GetBuildInfo(int build) - { - for (int i = 0; PostBcAcceptedClientBuilds[i].Build; ++i) - if (PostBcAcceptedClientBuilds[i].Build == build) - return &PostBcAcceptedClientBuilds[i]; - - for (int i = 0; PreBcAcceptedClientBuilds[i].Build; ++i) - if (PreBcAcceptedClientBuilds[i].Build == build) - return &PreBcAcceptedClientBuilds[i]; - - return NULL; - } - - bool IsBuildSupportingBattlenet(int build) - { - return build >= 15595; - } -} diff --git a/src/server/authserver/Authentication/AuthCodes.h b/src/server/authserver/Authentication/AuthCodes.h deleted file mode 100644 index bc7f0c43f1..0000000000 --- a/src/server/authserver/Authentication/AuthCodes.h +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (C) 2008-2014 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef _AUTHCODES_H -#define _AUTHCODES_H - -enum AuthResult -{ - WOW_SUCCESS = 0x00, - WOW_FAIL_BANNED = 0x03, - WOW_FAIL_UNKNOWN_ACCOUNT = 0x04, - WOW_FAIL_INCORRECT_PASSWORD = 0x05, - WOW_FAIL_ALREADY_ONLINE = 0x06, - WOW_FAIL_NO_TIME = 0x07, - WOW_FAIL_DB_BUSY = 0x08, - WOW_FAIL_VERSION_INVALID = 0x09, - WOW_FAIL_VERSION_UPDATE = 0x0A, - WOW_FAIL_INVALID_SERVER = 0x0B, - WOW_FAIL_SUSPENDED = 0x0C, - WOW_FAIL_FAIL_NOACCESS = 0x0D, - WOW_SUCCESS_SURVEY = 0x0E, - WOW_FAIL_PARENTCONTROL = 0x0F, - WOW_FAIL_LOCKED_ENFORCED = 0x10, - WOW_FAIL_TRIAL_ENDED = 0x11, - WOW_FAIL_USE_BATTLENET = 0x12, - WOW_FAIL_ANTI_INDULGENCE = 0x13, - WOW_FAIL_EXPIRED = 0x14, - WOW_FAIL_NO_GAME_ACCOUNT = 0x15, - WOW_FAIL_CHARGEBACK = 0x16, - WOW_FAIL_INTERNET_GAME_ROOM_WITHOUT_BNET = 0x17, - WOW_FAIL_GAME_ACCOUNT_LOCKED = 0x18, - WOW_FAIL_UNLOCKABLE_LOCK = 0x19, - WOW_FAIL_CONVERSION_REQUIRED = 0x20, - WOW_FAIL_DISCONNECTED = 0xFF -}; - -enum LoginResult -{ - LOGIN_OK = 0x00, - LOGIN_FAILED = 0x01, - LOGIN_FAILED2 = 0x02, - LOGIN_BANNED = 0x03, - LOGIN_UNKNOWN_ACCOUNT = 0x04, - LOGIN_UNKNOWN_ACCOUNT3 = 0x05, - LOGIN_ALREADYONLINE = 0x06, - LOGIN_NOTIME = 0x07, - LOGIN_DBBUSY = 0x08, - LOGIN_BADVERSION = 0x09, - LOGIN_DOWNLOAD_FILE = 0x0A, - LOGIN_FAILED3 = 0x0B, - LOGIN_SUSPENDED = 0x0C, - LOGIN_FAILED4 = 0x0D, - LOGIN_CONNECTED = 0x0E, - LOGIN_PARENTALCONTROL = 0x0F, - LOGIN_LOCKED_ENFORCED = 0x10 -}; - -enum GameAccountFlags -{ - GAMEACCOUNT_FLAG_GM = 0x00000001, - GAMEACCOUNT_FLAG_NOKICK = 0x00000002, - GAMEACCOUNT_FLAG_COLLECTOR = 0x00000004, - GAMEACCOUNT_FLAG_WOW_TRIAL = 0x00000008, - GAMEACCOUNT_FLAG_CANCELLED = 0x00000010, - GAMEACCOUNT_FLAG_IGR = 0x00000020, - GAMEACCOUNT_FLAG_WHOLESALER = 0x00000040, - GAMEACCOUNT_FLAG_PRIVILEGED = 0x00000080, - GAMEACCOUNT_FLAG_EU_FORBID_ELV = 0x00000100, - GAMEACCOUNT_FLAG_EU_FORBID_BILLING = 0x00000200, - GAMEACCOUNT_FLAG_WOW_RESTRICTED = 0x00000400, - GAMEACCOUNT_FLAG_REFERRAL = 0x00000800, - GAMEACCOUNT_FLAG_BLIZZARD = 0x00001000, - GAMEACCOUNT_FLAG_RECURRING_BILLING = 0x00002000, - GAMEACCOUNT_FLAG_NOELECTUP = 0x00004000, - GAMEACCOUNT_FLAG_KR_CERTIFICATE = 0x00008000, - GAMEACCOUNT_FLAG_EXPANSION_COLLECTOR = 0x00010000, - GAMEACCOUNT_FLAG_DISABLE_VOICE = 0x00020000, - GAMEACCOUNT_FLAG_DISABLE_VOICE_SPEAK = 0x00040000, - GAMEACCOUNT_FLAG_REFERRAL_RESURRECT = 0x00080000, - GAMEACCOUNT_FLAG_EU_FORBID_CC = 0x00100000, - GAMEACCOUNT_FLAG_OPENBETA_DELL = 0x00200000, - GAMEACCOUNT_FLAG_PROPASS = 0x00400000, - GAMEACCOUNT_FLAG_PROPASS_LOCK = 0x00800000, - GAMEACCOUNT_FLAG_PENDING_UPGRADE = 0x01000000, - GAMEACCOUNT_FLAG_RETAIL_FROM_TRIAL = 0x02000000, - GAMEACCOUNT_FLAG_EXPANSION2_COLLECTOR = 0x04000000, - GAMEACCOUNT_FLAG_OVERMIND_LINKED = 0x08000000, - GAMEACCOUNT_FLAG_DEMOS = 0x10000000, - GAMEACCOUNT_FLAG_DEATH_KNIGHT_OK = 0x20000000, -}; - -enum ExpansionFlags -{ - POST_BC_EXP_FLAG = 0x2, - PRE_BC_EXP_FLAG = 0x1, - NO_VALID_EXP_FLAG = 0x0 -}; - -struct RealmBuildInfo -{ - int Build; - int MajorVersion; - int MinorVersion; - int BugfixVersion; - int HotfixVersion; -}; - -namespace AuthHelper -{ - RealmBuildInfo const* GetBuildInfo(int build); - bool IsAcceptedClientBuild(int build); - bool IsPostBCAcceptedClientBuild(int build); - bool IsPreBCAcceptedClientBuild(int build); - bool IsBuildSupportingBattlenet(int build); -} - -#endif diff --git a/src/server/authserver/Authentication/TOTP.cpp b/src/server/authserver/Authentication/TOTP.cpp deleted file mode 100644 index 01842cfe23..0000000000 --- a/src/server/authserver/Authentication/TOTP.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (C) 2008-2014 TrinityCore - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#include "TOTP.h" -#include - -int base32_decode(const char* encoded, char* result, int bufSize) -{ - // Base32 implementation - // Copyright 2010 Google Inc. - // Author: Markus Gutschke - // Licensed under the Apache License, Version 2.0 - int buffer = 0; - int bitsLeft = 0; - int count = 0; - for (const char *ptr = encoded; count < bufSize && *ptr; ++ptr) - { - char ch = *ptr; - if (ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n' || ch == '-') - continue; - buffer <<= 5; - - // Deal with commonly mistyped characters - if (ch == '0') - ch = 'O'; - else if (ch == '1') - ch = 'L'; - else if (ch == '8') - ch = 'B'; - - // Look up one base32 digit - if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')) - ch = (ch & 0x1F) - 1; - else if (ch >= '2' && ch <= '7') - ch -= '2' - 26; - else - return -1; - - buffer |= ch; - bitsLeft += 5; - if (bitsLeft >= 8) - { - result[count++] = buffer >> (bitsLeft - 8); - bitsLeft -= 8; - } - } - - if (count < bufSize) - result[count] = '\000'; - return count; -} - -#define HMAC_RES_SIZE 20 - -namespace TOTP -{ - unsigned int GenerateToken(const char* b32key) - { - size_t keySize = strlen(b32key); - int bufsize = (keySize + 7)/8*5; - char* encoded = new char[bufsize]; - memset(encoded, 0, bufsize); - unsigned int hmacResSize = HMAC_RES_SIZE; - unsigned char hmacRes[HMAC_RES_SIZE]; - unsigned long timestamp = time(NULL)/30; - unsigned char challenge[8]; - - for (int i = 8; i--;timestamp >>= 8) - challenge[i] = timestamp; - - base32_decode(b32key, encoded, bufsize); - HMAC(EVP_sha1(), encoded, bufsize, challenge, 8, hmacRes, &hmacResSize); - unsigned int offset = hmacRes[19] & 0xF; - unsigned int truncHash = (hmacRes[offset] << 24) | (hmacRes[offset+1] << 16 )| (hmacRes[offset+2] << 8) | (hmacRes[offset+3]); - truncHash &= 0x7FFFFFFF; - - delete[] encoded; - - return truncHash % 1000000; - } -} diff --git a/src/server/authserver/Authentication/TOTP.h b/src/server/authserver/Authentication/TOTP.h deleted file mode 100644 index 7ced260758..0000000000 --- a/src/server/authserver/Authentication/TOTP.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2008-2014 TrinityCore - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef _TOTP_H -#define _TOTP_H - -#include "openssl/hmac.h" -#include "openssl/evp.h" - -namespace TOTP -{ - unsigned int GenerateToken(const char* b32key); -} - -#endif diff --git a/src/server/authserver/CMakeLists.txt b/src/server/authserver/CMakeLists.txt deleted file mode 100644 index b40b8c906f..0000000000 --- a/src/server/authserver/CMakeLists.txt +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright (C) 2008-2014 TrinityCore -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -########### authserver ############### - -file(GLOB_RECURSE sources_authentication Authentication/*.cpp Authentication/*.h) -file(GLOB_RECURSE sources_realms Realms/*.cpp Realms/*.h) -file(GLOB_RECURSE sources_server Server/*.cpp Server/*.h) -file(GLOB sources_localdir *.cpp *.h) - -if (USE_COREPCH) - set(authserver_PCH_HDR PrecompiledHeaders/authPCH.h) - set(authserver_PCH_SRC PrecompiledHeaders/authPCH.cpp) -endif() - -set(authserver_SRCS - ${authserver_SRCS} - ${sources_authentication} - ${sources_realms} - ${sources_server} - ${sources_localdir} -) - -if( WIN32 ) - set(authserver_SRCS - ${authserver_SRCS} - ${sources_windows_Debugging} - ) - if ( MSVC ) - set(authserver_SRCS - ${authserver_SRCS} - authserver.rc - ) - endif () -endif() - -include_directories( - ${CMAKE_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/src/server/shared - ${CMAKE_SOURCE_DIR}/src/server/shared/Configuration - ${CMAKE_SOURCE_DIR}/src/server/shared/Database - ${CMAKE_SOURCE_DIR}/src/server/shared/Debugging - ${CMAKE_SOURCE_DIR}/src/server/shared/Packets - ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography - ${CMAKE_SOURCE_DIR}/src/server/shared/Cryptography/Authentication - ${CMAKE_SOURCE_DIR}/src/server/shared/Logging - ${CMAKE_SOURCE_DIR}/src/server/shared/Networking - ${CMAKE_SOURCE_DIR}/src/server/shared/Threading - ${CMAKE_SOURCE_DIR}/src/server/shared/Utilities - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/Authentication - ${CMAKE_CURRENT_SOURCE_DIR}/Realms - ${CMAKE_CURRENT_SOURCE_DIR}/Server - ${MYSQL_INCLUDE_DIR} - ${OPENSSL_INCLUDE_DIR} - ${VALGRIND_INCLUDE_DIR} -) - -add_executable(authserver - ${authserver_SRCS} - ${authserver_PCH_SRC} -) - -add_dependencies(authserver revision.h) - -if( NOT WIN32 ) - set_target_properties(authserver PROPERTIES - COMPILE_DEFINITIONS _TRINITY_REALM_CONFIG="${CONF_DIR}/authserver.conf" - ) -endif() - -target_link_libraries(authserver - shared - ${MYSQL_LIBRARY} - ${OPENSSL_LIBRARIES} - ${CMAKE_THREAD_LIBS_INIT} - ${Boost_LIBRARIES} -) - -if( WIN32 ) - if ( MSVC ) - add_custom_command(TARGET authserver - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/authserver.conf.dist ${CMAKE_BINARY_DIR}/bin/$(ConfigurationName)/ - ) - elseif ( MINGW ) - add_custom_command(TARGET authserver - POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/authserver.conf.dist ${CMAKE_BINARY_DIR}/bin/ - ) - endif() -endif() - -if( UNIX ) - install(TARGETS authserver DESTINATION bin) - install(FILES authserver.conf.dist DESTINATION ${CONF_DIR}) -elseif( WIN32 ) - install(TARGETS authserver DESTINATION "${CMAKE_INSTALL_PREFIX}") - install(FILES authserver.conf.dist DESTINATION "${CMAKE_INSTALL_PREFIX}") -endif() - -# Generate precompiled header -if (USE_COREPCH) - add_cxx_pch(authserver ${authserver_PCH_HDR} ${authserver_PCH_SRC}) -endif() diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp deleted file mode 100644 index 5f08ebe312..0000000000 --- a/src/server/authserver/Main.cpp +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Copyright (C) 2008-2014 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -/** -* @file main.cpp -* @brief Authentication Server main program -* -* This file contains the main program for the -* authentication server -*/ - -#include "AuthSocketMgr.h" -#include "Common.h" -#include "Config.h" -#include "DatabaseEnv.h" -#include "Log.h" -#include "ProcessPriority.h" -#include "RealmList.h" -#include "SystemConfig.h" -#include "Util.h" -#include -#include -#include -#include -#include -#include - -using boost::asio::ip::tcp; -using namespace boost::program_options; - -#ifndef _TRINITY_REALM_CONFIG -# define _TRINITY_REALM_CONFIG "authserver.conf" -#endif - -bool StartDB(); -void StopDB(); -void SignalHandler(const boost::system::error_code& error, int signalNumber); -void KeepDatabaseAliveHandler(const boost::system::error_code& error); -variables_map GetConsoleArguments(int argc, char** argv, std::string& configFile); - -boost::asio::io_service _ioService; -boost::asio::deadline_timer _dbPingTimer(_ioService); -uint32 _dbPingInterval; -LoginDatabaseWorkerPool LoginDatabase; - -int main(int argc, char** argv) -{ - std::string configFile = _TRINITY_REALM_CONFIG; - auto vm = GetConsoleArguments(argc, argv, configFile); - // exit if help is enabled - if (vm.count("help")) - return 0; - - std::string configError; - if (!sConfigMgr->LoadInitial(configFile, configError)) - { - printf("Error in config file: %s\n", configError.c_str()); - return 1; - } - - TC_LOG_INFO("server.authserver", "%s (authserver)", _FULLVERSION); - TC_LOG_INFO("server.authserver", " to stop.\n"); - TC_LOG_INFO("server.authserver", "Using configuration file %s.", configFile.c_str()); - TC_LOG_INFO("server.authserver", "Using SSL version: %s (library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION)); - TC_LOG_INFO("server.authserver", "Using Boost version: %i.%i.%i", BOOST_VERSION / 100000, BOOST_VERSION / 100 % 1000, BOOST_VERSION % 100); - - // authserver PID file creation - std::string pidFile = sConfigMgr->GetStringDefault("PidFile", ""); - if (!pidFile.empty()) - { - if (uint32 pid = CreatePIDFile(pidFile)) - TC_LOG_INFO("server.authserver", "Daemon PID: %u\n", pid); - else - { - TC_LOG_ERROR("server.authserver", "Cannot create PID file %s.\n", pidFile.c_str()); - return 1; - } - } - - // Initialize the database connection - if (!StartDB()) - return 1; - - // Get the list of realms for the server - sRealmList->Initialize(_ioService, sConfigMgr->GetIntDefault("RealmsStateUpdateDelay", 20)); - - if (sRealmList->size() == 0) - { - TC_LOG_ERROR("server.authserver", "No valid realms specified."); - StopDB(); - return 1; - } - - // Start the listening port (acceptor) for auth connections - int32 port = sConfigMgr->GetIntDefault("RealmServerPort", 3724); - if (port < 0 || port > 0xFFFF) - { - TC_LOG_ERROR("server.authserver", "Specified port out of allowed range (1-65535)"); - StopDB(); - return 1; - } - - std::string bindIp = sConfigMgr->GetStringDefault("BindIP", "0.0.0.0"); - - sAuthSocketMgr.StartNetwork(_ioService, bindIp, port); - - // Set signal handlers - boost::asio::signal_set signals(_ioService, SIGINT, SIGTERM); -#if PLATFORM == PLATFORM_WINDOWS - signals.add(SIGBREAK); -#endif - signals.async_wait(SignalHandler); - - // Set process priority according to configuration settings - SetProcessPriority("server.authserver"); - - // Enabled a timed callback for handling the database keep alive ping - _dbPingInterval = sConfigMgr->GetIntDefault("MaxPingTime", 30); - _dbPingTimer.expires_from_now(boost::posix_time::minutes(_dbPingInterval)); - _dbPingTimer.async_wait(KeepDatabaseAliveHandler); - - // Start the io service worker loop - _ioService.run(); - - // Close the Database Pool and library - StopDB(); - - TC_LOG_INFO("server.authserver", "Halting process..."); - return 0; -} - - -/// Initialize connection to the database -bool StartDB() -{ - MySQL::Library_Init(); - - std::string dbstring = sConfigMgr->GetStringDefault("LoginDatabaseInfo", ""); - if (dbstring.empty()) - { - TC_LOG_ERROR("server.authserver", "Database not specified"); - return false; - } - - int32 worker_threads = sConfigMgr->GetIntDefault("LoginDatabase.WorkerThreads", 1); - if (worker_threads < 1 || worker_threads > 32) - { - TC_LOG_ERROR("server.authserver", "Improper value specified for LoginDatabase.WorkerThreads, defaulting to 1."); - worker_threads = 1; - } - - int32 synch_threads = sConfigMgr->GetIntDefault("LoginDatabase.SynchThreads", 1); - if (synch_threads < 1 || synch_threads > 32) - { - TC_LOG_ERROR("server.authserver", "Improper value specified for LoginDatabase.SynchThreads, defaulting to 1."); - synch_threads = 1; - } - - // NOTE: While authserver is singlethreaded you should keep synch_threads == 1. Increasing it is just silly since only 1 will be used ever. - if (!LoginDatabase.Open(dbstring, uint8(worker_threads), uint8(synch_threads))) - { - TC_LOG_ERROR("server.authserver", "Cannot connect to database"); - return false; - } - - TC_LOG_INFO("server.authserver", "Started auth database connection pool."); - sLog->SetRealmId(0); // Enables DB appenders when realm is set. - return true; -} - -/// Close the connection to the database -void StopDB() -{ - LoginDatabase.Close(); - MySQL::Library_End(); -} - -void SignalHandler(const boost::system::error_code& error, int /*signalNumber*/) -{ - if (!error) - _ioService.stop(); -} - -void KeepDatabaseAliveHandler(const boost::system::error_code& error) -{ - if (!error) - { - TC_LOG_INFO("server.authserver", "Ping MySQL to keep connection alive"); - LoginDatabase.KeepAlive(); - - _dbPingTimer.expires_from_now(boost::posix_time::minutes(_dbPingInterval)); - _dbPingTimer.async_wait(KeepDatabaseAliveHandler); - } -} - -variables_map GetConsoleArguments(int argc, char** argv, std::string& configFile) -{ - options_description all("Allowed options"); - all.add_options() - ("help,h", "print usage message") - ("config,c", value(&configFile)->default_value(_TRINITY_REALM_CONFIG), "use as configuration file") - ; - variables_map variablesMap; - try - { - store(command_line_parser(argc, argv).options(all).allow_unregistered().run(), variablesMap); - notify(variablesMap); - } - catch (std::exception& e) { - std::cerr << e.what() << "\n"; - } - - if (variablesMap.count("help")) { - std::cout << all << "\n"; - } - - return variablesMap; -} diff --git a/src/server/authserver/PrecompiledHeaders/authPCH.cpp b/src/server/authserver/PrecompiledHeaders/authPCH.cpp deleted file mode 100644 index eed50cb2c0..0000000000 --- a/src/server/authserver/PrecompiledHeaders/authPCH.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "authPCH.h" diff --git a/src/server/authserver/PrecompiledHeaders/authPCH.h b/src/server/authserver/PrecompiledHeaders/authPCH.h deleted file mode 100644 index 9042416134..0000000000 --- a/src/server/authserver/PrecompiledHeaders/authPCH.h +++ /dev/null @@ -1,7 +0,0 @@ -#include "Common.h" -#include "Configuration/Config.h" -#include "Database/DatabaseEnv.h" -#include "Log.h" -#include "RealmList.h" -#include "ByteBuffer.h" -#include "AuthSession.h" diff --git a/src/server/authserver/Realms/RealmList.cpp b/src/server/authserver/Realms/RealmList.cpp deleted file mode 100644 index 15302c74ac..0000000000 --- a/src/server/authserver/Realms/RealmList.cpp +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (C) 2008-2014 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#include -#include "Common.h" -#include "RealmList.h" -#include "Database/DatabaseEnv.h" -#include "Util.h" - -ip::tcp::endpoint Realm::GetAddressForClient(ip::address const& clientAddr) const -{ - ip::address realmIp; - - // Attempt to send best address for client - if (clientAddr.is_loopback()) - { - // Try guessing if realm is also connected locally - if (LocalAddress.is_loopback() || ExternalAddress.is_loopback()) - realmIp = clientAddr; - else - { - // Assume that user connecting from the machine that authserver is located on - // has all realms available in his local network - realmIp = LocalAddress; - } - } - else - { - if (clientAddr.is_v4() && - (clientAddr.to_v4().to_ulong() & LocalSubnetMask.to_v4().to_ulong()) == - (LocalAddress.to_v4().to_ulong() & LocalSubnetMask.to_v4().to_ulong())) - { - realmIp = LocalAddress; - } - else - realmIp = ExternalAddress; - } - - ip::tcp::endpoint endpoint(realmIp, port); - - // Return external IP - return endpoint; -} - -RealmList::RealmList() : m_UpdateInterval(0), m_NextUpdateTime(time(NULL)), _resolver(nullptr) -{ -} - -RealmList::~RealmList() -{ - delete _resolver; -} - -// Load the realm list from the database -void RealmList::Initialize(boost::asio::io_service& ioService, uint32 updateInterval) -{ - _resolver = new boost::asio::ip::tcp::resolver(ioService); - m_UpdateInterval = updateInterval; - - // Get the content of the realmlist table in the database - UpdateRealms(true); -} - -void RealmList::UpdateRealm(uint32 id, const std::string& name, ip::address const& address, ip::address const& localAddr, - ip::address const& localSubmask, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float population, uint32 build) -{ - // Create new if not exist or update existed - Realm& realm = m_realms[name]; - - realm.m_ID = id; - realm.name = name; - realm.icon = icon; - realm.flag = flag; - realm.timezone = timezone; - realm.allowedSecurityLevel = allowedSecurityLevel; - realm.populationLevel = population; - - realm.ExternalAddress = address; - realm.LocalAddress = localAddr; - realm.LocalSubnetMask = localSubmask; - realm.port = port; - realm.gamebuild = build; -} - -void RealmList::UpdateIfNeed() -{ - // maybe disabled or updated recently - if (!m_UpdateInterval || m_NextUpdateTime > time(NULL)) - return; - - m_NextUpdateTime = time(NULL) + m_UpdateInterval; - - // Clears Realm list - m_realms.clear(); - - // Get the content of the realmlist table in the database - UpdateRealms(); -} - -void RealmList::UpdateRealms(bool init) -{ - TC_LOG_INFO("server.authserver", "Updating Realm List..."); - - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_REALMLIST); - PreparedQueryResult result = LoginDatabase.Query(stmt); - - // Circle through results and add them to the realm map - if (result) - { - do - { - try - { - boost::asio::ip::tcp::resolver::iterator end; - - Field* fields = result->Fetch(); - uint32 realmId = fields[0].GetUInt32(); - std::string name = fields[1].GetString(); - boost::asio::ip::tcp::resolver::query externalAddressQuery(ip::tcp::v4(), fields[2].GetString(), ""); - - boost::system::error_code ec; - boost::asio::ip::tcp::resolver::iterator endPoint = _resolver->resolve(externalAddressQuery, ec); - if (endPoint == end || ec) - { - TC_LOG_ERROR("server.authserver", "Could not resolve address %s", fields[2].GetString().c_str()); - return; - } - - ip::address externalAddress = (*endPoint).endpoint().address(); - - boost::asio::ip::tcp::resolver::query localAddressQuery(ip::tcp::v4(), fields[3].GetString(), ""); - endPoint = _resolver->resolve(localAddressQuery, ec); - if (endPoint == end || ec) - { - TC_LOG_ERROR("server.authserver", "Could not resolve address %s", fields[3].GetString().c_str()); - return; - } - - ip::address localAddress = (*endPoint).endpoint().address(); - - boost::asio::ip::tcp::resolver::query localSubmaskQuery(ip::tcp::v4(), fields[4].GetString(), ""); - endPoint = _resolver->resolve(localSubmaskQuery, ec); - if (endPoint == end || ec) - { - TC_LOG_ERROR("server.authserver", "Could not resolve address %s", fields[4].GetString().c_str()); - return; - } - - ip::address localSubmask = (*endPoint).endpoint().address(); - - uint16 port = fields[5].GetUInt16(); - uint8 icon = fields[6].GetUInt8(); - RealmFlags flag = RealmFlags(fields[7].GetUInt8()); - uint8 timezone = fields[8].GetUInt8(); - uint8 allowedSecurityLevel = fields[9].GetUInt8(); - float pop = fields[10].GetFloat(); - uint32 build = fields[11].GetUInt32(); - - UpdateRealm(realmId, name, externalAddress, localAddress, localSubmask, port, icon, flag, timezone, - (allowedSecurityLevel <= SEC_ADMINISTRATOR ? AccountTypes(allowedSecurityLevel) : SEC_ADMINISTRATOR), pop, build); - - if (init) - TC_LOG_INFO("server.authserver", "Added realm \"%s\" at %s:%u.", name.c_str(), m_realms[name].ExternalAddress.to_string().c_str(), port); - } - catch (std::exception& ex) - { - TC_LOG_ERROR("server.authserver", "Realmlist::UpdateRealms has thrown an exception: %s", ex.what()); - ASSERT(false); - } - } - while (result->NextRow()); - } -} diff --git a/src/server/authserver/Realms/RealmList.h b/src/server/authserver/Realms/RealmList.h deleted file mode 100644 index 9d5771144a..0000000000 --- a/src/server/authserver/Realms/RealmList.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright (C) 2008-2014 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef _REALMLIST_H -#define _REALMLIST_H - -#include -#include -#include -#include "Common.h" - -using namespace boost::asio; - -enum RealmFlags -{ - REALM_FLAG_NONE = 0x00, - REALM_FLAG_INVALID = 0x01, - REALM_FLAG_OFFLINE = 0x02, - REALM_FLAG_SPECIFYBUILD = 0x04, - REALM_FLAG_UNK1 = 0x08, - REALM_FLAG_UNK2 = 0x10, - REALM_FLAG_RECOMMENDED = 0x20, - REALM_FLAG_NEW = 0x40, - REALM_FLAG_FULL = 0x80 -}; - -// Storage object for a realm -struct Realm -{ - ip::address ExternalAddress; - ip::address LocalAddress; - ip::address LocalSubnetMask; - uint16 port; - std::string name; - uint8 icon; - RealmFlags flag; - uint8 timezone; - uint32 m_ID; - AccountTypes allowedSecurityLevel; - float populationLevel; - uint32 gamebuild; - - ip::tcp::endpoint GetAddressForClient(ip::address const& clientAddr) const; -}; - -/// Storage object for the list of realms on the server -class RealmList -{ -public: - typedef std::map RealmMap; - - static RealmList* instance() - { - static RealmList instance; - return &instance; - } - - ~RealmList(); - - void Initialize(boost::asio::io_service& ioService, uint32 updateInterval); - - void UpdateIfNeed(); - - void AddRealm(const Realm& NewRealm) { m_realms[NewRealm.name] = NewRealm; } - - RealmMap::const_iterator begin() const { return m_realms.begin(); } - RealmMap::const_iterator end() const { return m_realms.end(); } - uint32 size() const { return m_realms.size(); } - -private: - RealmList(); - - void UpdateRealms(bool init = false); - void UpdateRealm(uint32 id, const std::string& name, ip::address const& address, ip::address const& localAddr, - ip::address const& localSubmask, uint16 port, uint8 icon, RealmFlags flag, uint8 timezone, AccountTypes allowedSecurityLevel, float population, uint32 build); - - RealmMap m_realms; - uint32 m_UpdateInterval; - time_t m_NextUpdateTime; - boost::asio::ip::tcp::resolver* _resolver; -}; - -#define sRealmList RealmList::instance() -#endif diff --git a/src/server/authserver/Server/AuthSession.cpp b/src/server/authserver/Server/AuthSession.cpp deleted file mode 100644 index 248010ef11..0000000000 --- a/src/server/authserver/Server/AuthSession.cpp +++ /dev/null @@ -1,902 +0,0 @@ -/* -* Copyright (C) 2008-2014 TrinityCore -* Copyright (C) 2005-2009 MaNGOS -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with this program. If not, see . -*/ - -#include "AuthSession.h" -#include "Log.h" -#include "AuthCodes.h" -#include "Database/DatabaseEnv.h" -#include "SHA1.h" -#include "TOTP.h" -#include "openssl/crypto.h" -#include "Configuration/Config.h" -#include "RealmList.h" -#include - -using boost::asio::ip::tcp; - -enum eAuthCmd -{ - AUTH_LOGON_CHALLENGE = 0x00, - AUTH_LOGON_PROOF = 0x01, - AUTH_RECONNECT_CHALLENGE = 0x02, - AUTH_RECONNECT_PROOF = 0x03, - REALM_LIST = 0x10, - XFER_INITIATE = 0x30, - XFER_DATA = 0x31, - XFER_ACCEPT = 0x32, - XFER_RESUME = 0x33, - XFER_CANCEL = 0x34 -}; - -enum eStatus -{ - STATUS_CONNECTED = 0, - STATUS_AUTHED -}; - -#pragma pack(push, 1) - -typedef struct AUTH_LOGON_CHALLENGE_C -{ - uint8 cmd; - uint8 error; - uint16 size; - uint8 gamename[4]; - uint8 version1; - uint8 version2; - uint8 version3; - uint16 build; - uint8 platform[4]; - uint8 os[4]; - uint8 country[4]; - uint32 timezone_bias; - uint32 ip; - uint8 I_len; - uint8 I[1]; -} sAuthLogonChallenge_C; - -typedef struct AUTH_LOGON_PROOF_C -{ - uint8 cmd; - uint8 A[32]; - uint8 M1[20]; - uint8 crc_hash[20]; - uint8 number_of_keys; - uint8 securityFlags; -} sAuthLogonProof_C; - -typedef struct AUTH_LOGON_PROOF_S -{ - uint8 cmd; - uint8 error; - uint8 M2[20]; - uint32 AccountFlags; - uint32 SurveyId; - uint16 unk3; -} sAuthLogonProof_S; - -typedef struct AUTH_LOGON_PROOF_S_OLD -{ - uint8 cmd; - uint8 error; - uint8 M2[20]; - uint32 unk2; -} sAuthLogonProof_S_Old; - -typedef struct AUTH_RECONNECT_PROOF_C -{ - uint8 cmd; - uint8 R1[16]; - uint8 R2[20]; - uint8 R3[20]; - uint8 number_of_keys; -} sAuthReconnectProof_C; - -#pragma pack(pop) - -enum class BufferSizes : uint32 -{ - SRP_6_V = 0x20, - SRP_6_S = 0x20, -}; - -#define AUTH_LOGON_CHALLENGE_INITIAL_SIZE 4 -#define REALM_LIST_PACKET_SIZE 5 -#define XFER_ACCEPT_SIZE 1 -#define XFER_RESUME_SIZE 9 -#define XFER_CANCEL_SIZE 1 - -std::unordered_map AuthSession::InitHandlers() -{ - std::unordered_map handlers; - - handlers[AUTH_LOGON_CHALLENGE] = { STATUS_CONNECTED, AUTH_LOGON_CHALLENGE_INITIAL_SIZE, &AuthSession::HandleLogonChallenge }; - handlers[AUTH_LOGON_PROOF] = { STATUS_CONNECTED, sizeof(AUTH_LOGON_PROOF_C), &AuthSession::HandleLogonProof }; - handlers[AUTH_RECONNECT_CHALLENGE] = { STATUS_CONNECTED, AUTH_LOGON_CHALLENGE_INITIAL_SIZE, &AuthSession::HandleReconnectChallenge }; - handlers[AUTH_RECONNECT_PROOF] = { STATUS_CONNECTED, sizeof(AUTH_RECONNECT_PROOF_C), &AuthSession::HandleReconnectProof }; - handlers[REALM_LIST] = { STATUS_AUTHED, REALM_LIST_PACKET_SIZE, &AuthSession::HandleRealmList }; - handlers[XFER_ACCEPT] = { STATUS_AUTHED, XFER_ACCEPT_SIZE, &AuthSession::HandleXferAccept }; - handlers[XFER_RESUME] = { STATUS_AUTHED, XFER_RESUME_SIZE, &AuthSession::HandleXferResume }; - handlers[XFER_CANCEL] = { STATUS_AUTHED, XFER_CANCEL_SIZE, &AuthSession::HandleXferCancel }; - - return handlers; -} - -std::unordered_map const Handlers = AuthSession::InitHandlers(); - -void AuthSession::ReadHandler() -{ - MessageBuffer& packet = GetReadBuffer(); - while (packet.GetActiveSize()) - { - uint8 cmd = packet.GetReadPointer()[0]; - auto itr = Handlers.find(cmd); - if (itr == Handlers.end()) - { - // well we dont handle this, lets just ignore it - packet.Reset(); - break; - } - - uint16 size = uint16(itr->second.packetSize); - if (packet.GetActiveSize() < size) - break; - - if (cmd == AUTH_LOGON_CHALLENGE || cmd == AUTH_RECONNECT_CHALLENGE) - { - sAuthLogonChallenge_C* challenge = reinterpret_cast(packet.GetReadPointer()); - size += challenge->size; - } - - if (packet.GetActiveSize() < size) - break; - - if (!(*this.*Handlers.at(cmd).handler)()) - { - CloseSocket(); - return; - } - - packet.ReadCompleted(size); - } - - AsyncRead(); -} - -void AuthSession::SendPacket(ByteBuffer& packet) -{ - if (!IsOpen()) - return; - - if (!packet.empty()) - { - MessageBuffer buffer; - buffer.Write(packet.contents(), packet.size()); - - std::unique_lock guard(_writeLock); - - QueuePacket(std::move(buffer), guard); - } -} - -bool AuthSession::HandleLogonChallenge() -{ - sAuthLogonChallenge_C* challenge = reinterpret_cast(GetReadBuffer().GetReadPointer()); - - //TC_LOG_DEBUG("server.authserver", "[AuthChallenge] got full packet, %#04x bytes", challenge->size); - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] name(%d): '%s'", challenge->I_len, challenge->I); - - ByteBuffer pkt; - - _login.assign((const char*)challenge->I, challenge->I_len); - _build = challenge->build; - _expversion = uint8(AuthHelper::IsPostBCAcceptedClientBuild(_build) ? POST_BC_EXP_FLAG : (AuthHelper::IsPreBCAcceptedClientBuild(_build) ? PRE_BC_EXP_FLAG : NO_VALID_EXP_FLAG)); - _os = (const char*)challenge->os; - - if (_os.size() > 4) - return false; - - // Restore string order as its byte order is reversed - std::reverse(_os.begin(), _os.end()); - - pkt << uint8(AUTH_LOGON_CHALLENGE); - pkt << uint8(0x00); - - // Verify that this IP is not in the ip_banned table - LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_DEL_EXPIRED_IP_BANS)); - - std::string ipAddress = GetRemoteIpAddress().to_string(); - uint16 port = GetRemotePort(); - - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_IP_BANNED); - stmt->setString(0, ipAddress); - PreparedQueryResult result = LoginDatabase.Query(stmt); - if (result) - { - pkt << uint8(WOW_FAIL_BANNED); - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] Banned ip tries to login!", ipAddress.c_str(), port); - } - else - { - // Get the account details from the account table - // No SQL injection (prepared statement) - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_LOGONCHALLENGE); - stmt->setString(0, _login); - - PreparedQueryResult res2 = LoginDatabase.Query(stmt); - if (res2) - { - Field* fields = res2->Fetch(); - - // If the IP is 'locked', check that the player comes indeed from the correct IP address - bool locked = false; - if (fields[2].GetUInt8() == 1) // if ip is locked - { - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is locked to IP - '%s'", _login.c_str(), fields[4].GetCString()); - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Player address is '%s'", ipAddress.c_str()); - - if (strcmp(fields[4].GetCString(), ipAddress.c_str()) != 0) - { - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account IP differs"); - pkt << uint8(WOW_FAIL_LOCKED_ENFORCED); - locked = true; - } - else - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account IP matches"); - } - else - { - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is not locked to ip", _login.c_str()); - std::string accountCountry = fields[3].GetString(); - if (accountCountry.empty() || accountCountry == "00") - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is not locked to country", _login.c_str()); - else if (!accountCountry.empty()) - { - uint32 ip = inet_addr(ipAddress.c_str()); - EndianConvertReverse(ip); - - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_LOGON_COUNTRY); - stmt->setUInt32(0, ip); - if (PreparedQueryResult sessionCountryQuery = LoginDatabase.Query(stmt)) - { - std::string loginCountry = (*sessionCountryQuery)[0].GetString(); - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is locked to country: '%s' Player country is '%s'", _login.c_str(), - accountCountry.c_str(), loginCountry.c_str()); - - if (loginCountry != accountCountry) - { - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account country differs."); - pkt << uint8(WOW_FAIL_UNLOCKABLE_LOCK); - locked = true; - } - else - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account country matches"); - } - else - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] IP2NATION Table empty"); - } - } - - if (!locked) - { - //set expired bans to inactive - LoginDatabase.DirectExecute(LoginDatabase.GetPreparedStatement(LOGIN_UPD_EXPIRED_ACCOUNT_BANS)); - - // If the account is banned, reject the logon attempt - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_BANNED); - stmt->setUInt32(0, fields[1].GetUInt32()); - PreparedQueryResult banresult = LoginDatabase.Query(stmt); - if (banresult) - { - if ((*banresult)[0].GetUInt32() == (*banresult)[1].GetUInt32()) - { - pkt << uint8(WOW_FAIL_BANNED); - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] Banned account %s tried to login!", ipAddress.c_str(), - port, _login.c_str()); - } - else - { - pkt << uint8(WOW_FAIL_SUSPENDED); - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] Temporarily banned account %s tried to login!", - ipAddress.c_str(), port, _login.c_str()); - } - } - else - { - // Get the password from the account table, upper it, and make the SRP6 calculation - std::string rI = fields[0].GetString(); - - // Don't calculate (v, s) if there are already some in the database - std::string databaseV = fields[6].GetString(); - std::string databaseS = fields[7].GetString(); - - TC_LOG_DEBUG("network", "database authentication values: v='%s' s='%s'", databaseV.c_str(), databaseS.c_str()); - - // multiply with 2 since bytes are stored as hexstring - if (databaseV.size() != size_t(BufferSizes::SRP_6_V) * 2 || databaseS.size() != size_t(BufferSizes::SRP_6_S) * 2) - SetVSFields(rI); - else - { - s.SetHexStr(databaseS.c_str()); - v.SetHexStr(databaseV.c_str()); - } - - b.SetRand(19 * 8); - BigNumber gmod = g.ModExp(b, N); - B = ((v * 3) + gmod) % N; - - ASSERT(gmod.GetNumBytes() <= 32); - - BigNumber unk3; - unk3.SetRand(16 * 8); - - // Fill the response packet with the result - if (fields[9].GetUInt32() && AuthHelper::IsBuildSupportingBattlenet(_build)) - pkt << uint8(WOW_FAIL_USE_BATTLENET); - else if (AuthHelper::IsAcceptedClientBuild(_build)) - pkt << uint8(WOW_SUCCESS); - else - pkt << uint8(WOW_FAIL_VERSION_INVALID); - - // B may be calculated < 32B so we force minimal length to 32B - pkt.append(B.AsByteArray(32).get(), 32); // 32 bytes - pkt << uint8(1); - pkt.append(g.AsByteArray(1).get(), 1); - pkt << uint8(32); - pkt.append(N.AsByteArray(32).get(), 32); - pkt.append(s.AsByteArray(int32(BufferSizes::SRP_6_S)).get(), size_t(BufferSizes::SRP_6_S)); // 32 bytes - pkt.append(unk3.AsByteArray(16).get(), 16); - uint8 securityFlags = 0; - - // Check if token is used - _tokenKey = fields[8].GetString(); - if (!_tokenKey.empty()) - securityFlags = 4; - - pkt << uint8(securityFlags); // security flags (0x0...0x04) - - if (securityFlags & 0x01) // PIN input - { - pkt << uint32(0); - pkt << uint64(0) << uint64(0); // 16 bytes hash? - } - - if (securityFlags & 0x02) // Matrix input - { - pkt << uint8(0); - pkt << uint8(0); - pkt << uint8(0); - pkt << uint8(0); - pkt << uint64(0); - } - - if (securityFlags & 0x04) // Security token input - pkt << uint8(1); - - uint8 secLevel = fields[5].GetUInt8(); - _accountSecurityLevel = secLevel <= SEC_ADMINISTRATOR ? AccountTypes(secLevel) : SEC_ADMINISTRATOR; - - _localizationName.resize(4); - for (int i = 0; i < 4; ++i) - _localizationName[i] = challenge->country[4 - i - 1]; - - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", - ipAddress.c_str(), port, _login.c_str(), - challenge->country[3], challenge->country[2], challenge->country[1], challenge->country[0], - GetLocaleByName(_localizationName) - ); - } - } - } - else //no account - pkt << uint8(WOW_FAIL_UNKNOWN_ACCOUNT); - } - - SendPacket(pkt); - return true; -} - -// Logon Proof command handler -bool AuthSession::HandleLogonProof() -{ - - TC_LOG_DEBUG("server.authserver", "Entering _HandleLogonProof"); - // Read the packet - sAuthLogonProof_C *logonProof = reinterpret_cast(GetReadBuffer().GetReadPointer()); - - // If the client has no valid version - if (_expversion == NO_VALID_EXP_FLAG) - { - // Check if we have the appropriate patch on the disk - TC_LOG_DEBUG("network", "Client with invalid version, patching is not implemented"); - return false; - } - - // Continue the SRP6 calculation based on data received from the client - BigNumber A; - - A.SetBinary(logonProof->A, 32); - - // SRP safeguard: abort if A == 0 - if (A.IsZero()) - { - return false; - } - - SHA1Hash sha; - sha.UpdateBigNumbers(&A, &B, NULL); - sha.Finalize(); - BigNumber u; - u.SetBinary(sha.GetDigest(), 20); - BigNumber S = (A * (v.ModExp(u, N))).ModExp(b, N); - - uint8 t[32]; - uint8 t1[16]; - uint8 vK[40]; - memcpy(t, S.AsByteArray(32).get(), 32); - - for (int i = 0; i < 16; ++i) - t1[i] = t[i * 2]; - - sha.Initialize(); - sha.UpdateData(t1, 16); - sha.Finalize(); - - for (int i = 0; i < 20; ++i) - vK[i * 2] = sha.GetDigest()[i]; - - for (int i = 0; i < 16; ++i) - t1[i] = t[i * 2 + 1]; - - sha.Initialize(); - sha.UpdateData(t1, 16); - sha.Finalize(); - - for (int i = 0; i < 20; ++i) - vK[i * 2 + 1] = sha.GetDigest()[i]; - - K.SetBinary(vK, 40); - - uint8 hash[20]; - - sha.Initialize(); - sha.UpdateBigNumbers(&N, NULL); - sha.Finalize(); - memcpy(hash, sha.GetDigest(), 20); - sha.Initialize(); - sha.UpdateBigNumbers(&g, NULL); - sha.Finalize(); - - for (int i = 0; i < 20; ++i) - hash[i] ^= sha.GetDigest()[i]; - - BigNumber t3; - t3.SetBinary(hash, 20); - - sha.Initialize(); - sha.UpdateData(_login); - sha.Finalize(); - uint8 t4[SHA_DIGEST_LENGTH]; - memcpy(t4, sha.GetDigest(), SHA_DIGEST_LENGTH); - - sha.Initialize(); - sha.UpdateBigNumbers(&t3, NULL); - sha.UpdateData(t4, SHA_DIGEST_LENGTH); - sha.UpdateBigNumbers(&s, &A, &B, &K, NULL); - sha.Finalize(); - BigNumber M; - M.SetBinary(sha.GetDigest(), sha.GetLength()); - - // Check if SRP6 results match (password is correct), else send an error - if (!memcmp(M.AsByteArray(sha.GetLength()).get(), logonProof->M1, 20)) - { - TC_LOG_DEBUG("server.authserver", "'%s:%d' User '%s' successfully authenticated", GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _login.c_str()); - - // Update the sessionkey, last_ip, last login time and reset number of failed logins in the account table for this account - PreparedStatement *stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_LOGONPROOF); - stmt->setString(0, K.AsHexStr()); - stmt->setString(1, GetRemoteIpAddress().to_string().c_str()); - stmt->setUInt32(2, GetLocaleByName(_localizationName)); - stmt->setString(3, _os); - stmt->setString(4, _login); - LoginDatabase.DirectExecute(stmt); - - // Finish SRP6 and send the final result to the client - sha.Initialize(); - sha.UpdateBigNumbers(&A, &M, &K, NULL); - sha.Finalize(); - - // Check auth token - if ((logonProof->securityFlags & 0x04) || !_tokenKey.empty()) - { - uint8 size = *(GetReadBuffer().GetReadPointer() + sizeof(sAuthLogonProof_C)); - std::string token(reinterpret_cast(GetReadBuffer().GetReadPointer() + sizeof(sAuthLogonProof_C) + sizeof(size)), size); - GetReadBuffer().ReadCompleted(sizeof(size) + size); - uint32 validToken = TOTP::GenerateToken(_tokenKey.c_str()); - uint32 incomingToken = atoi(token.c_str()); - if (validToken != incomingToken) - { - ByteBuffer packet; - packet << uint8(AUTH_LOGON_PROOF); - packet << uint8(WOW_FAIL_UNKNOWN_ACCOUNT); - packet << uint8(3); - packet << uint8(0); - SendPacket(packet); - return false; - } - } - - ByteBuffer packet; - if (_expversion & POST_BC_EXP_FLAG) // 2.x and 3.x clients - { - sAuthLogonProof_S proof; - memcpy(proof.M2, sha.GetDigest(), 20); - proof.cmd = AUTH_LOGON_PROOF; - proof.error = 0; - proof.AccountFlags = GAMEACCOUNT_FLAG_PROPASS_LOCK; - proof.SurveyId = 0; - proof.unk3 = 0; - - packet.resize(sizeof(proof)); - std::memcpy(packet.contents(), &proof, sizeof(proof)); - } - else - { - sAuthLogonProof_S_Old proof; - memcpy(proof.M2, sha.GetDigest(), 20); - proof.cmd = AUTH_LOGON_PROOF; - proof.error = 0; - proof.unk2 = 0x00; - - packet.resize(sizeof(proof)); - std::memcpy(packet.contents(), &proof, sizeof(proof)); - } - - SendPacket(packet); - _isAuthenticated = true; - } - else - { - ByteBuffer packet; - packet << uint8(AUTH_LOGON_PROOF); - packet << uint8(WOW_FAIL_UNKNOWN_ACCOUNT); - packet << uint8(3); - packet << uint8(0); - SendPacket(packet); - - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] account %s tried to login with invalid password!", - GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _login.c_str()); - - uint32 MaxWrongPassCount = sConfigMgr->GetIntDefault("WrongPass.MaxCount", 0); - - // We can not include the failed account login hook. However, this is a workaround to still log this. - if (sConfigMgr->GetBoolDefault("Wrong.Password.Login.Logging", false)) - { - PreparedStatement* logstmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_FALP_IP_LOGGING); - logstmt->setString(0, _login); - logstmt->setString(1, GetRemoteIpAddress().to_string()); - logstmt->setString(2, "Logged on failed AccountLogin due wrong password"); - - LoginDatabase.Execute(logstmt); - } - - if (MaxWrongPassCount > 0) - { - //Increment number of failed logins by one and if it reaches the limit temporarily ban that account or IP - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_FAILEDLOGINS); - stmt->setString(0, _login); - LoginDatabase.Execute(stmt); - - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_FAILEDLOGINS); - stmt->setString(0, _login); - - if (PreparedQueryResult loginfail = LoginDatabase.Query(stmt)) - { - uint32 failed_logins = (*loginfail)[1].GetUInt32(); - - if (failed_logins >= MaxWrongPassCount) - { - uint32 WrongPassBanTime = sConfigMgr->GetIntDefault("WrongPass.BanTime", 600); - bool WrongPassBanType = sConfigMgr->GetBoolDefault("WrongPass.BanType", false); - - if (WrongPassBanType) - { - uint32 acc_id = (*loginfail)[0].GetUInt32(); - stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ACCOUNT_AUTO_BANNED); - stmt->setUInt32(0, acc_id); - stmt->setUInt32(1, WrongPassBanTime); - LoginDatabase.Execute(stmt); - - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times", - GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _login.c_str(), WrongPassBanTime, failed_logins); - } - else - { - stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_IP_AUTO_BANNED); - stmt->setString(0, GetRemoteIpAddress().to_string()); - stmt->setUInt32(1, WrongPassBanTime); - LoginDatabase.Execute(stmt); - - TC_LOG_DEBUG("server.authserver", "'%s:%d' [AuthChallenge] IP got banned for '%u' seconds because account %s failed to authenticate '%u' times", - GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), WrongPassBanTime, _login.c_str(), failed_logins); - } - } - } - } - } - - return true; -} - -bool AuthSession::HandleReconnectChallenge() -{ - TC_LOG_DEBUG("server.authserver", "Entering _HandleReconnectChallenge"); - sAuthLogonChallenge_C* challenge = reinterpret_cast(GetReadBuffer().GetReadPointer()); - - //TC_LOG_DEBUG("server.authserver", "[AuthChallenge] got full packet, %#04x bytes", challenge->size); - TC_LOG_DEBUG("server.authserver", "[AuthChallenge] name(%d): '%s'", challenge->I_len, challenge->I); - - _login.assign((const char*)challenge->I, challenge->I_len); - - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_SESSIONKEY); - stmt->setString(0, _login); - PreparedQueryResult result = LoginDatabase.Query(stmt); - - // Stop if the account is not found - if (!result) - { - TC_LOG_ERROR("server.authserver", "'%s:%d' [ERROR] user %s tried to login and we cannot find his session key in the database.", - GetRemoteIpAddress().to_string().c_str(), GetRemotePort(), _login.c_str()); - return false; - } - - // Reinitialize build, expansion and the account securitylevel - _build = challenge->build; - _expversion = uint8(AuthHelper::IsPostBCAcceptedClientBuild(_build) ? POST_BC_EXP_FLAG : (AuthHelper::IsPreBCAcceptedClientBuild(_build) ? PRE_BC_EXP_FLAG : NO_VALID_EXP_FLAG)); - _os = (const char*)challenge->os; - - if (_os.size() > 4) - return false; - - // Restore string order as its byte order is reversed - std::reverse(_os.begin(), _os.end()); - - Field* fields = result->Fetch(); - uint8 secLevel = fields[2].GetUInt8(); - _accountSecurityLevel = secLevel <= SEC_ADMINISTRATOR ? AccountTypes(secLevel) : SEC_ADMINISTRATOR; - - K.SetHexStr((*result)[0].GetCString()); - - // Sending response - ByteBuffer pkt; - pkt << uint8(AUTH_RECONNECT_CHALLENGE); - pkt << uint8(0x00); - _reconnectProof.SetRand(16 * 8); - pkt.append(_reconnectProof.AsByteArray(16).get(), 16); // 16 bytes random - pkt << uint64(0x00) << uint64(0x00); // 16 bytes zeros - - SendPacket(pkt); - - return true; -} -bool AuthSession::HandleReconnectProof() -{ - TC_LOG_DEBUG("server.authserver", "Entering _HandleReconnectProof"); - sAuthReconnectProof_C *reconnectProof = reinterpret_cast(GetReadBuffer().GetReadPointer()); - - if (_login.empty() || !_reconnectProof.GetNumBytes() || !K.GetNumBytes()) - return false; - - BigNumber t1; - t1.SetBinary(reconnectProof->R1, 16); - - SHA1Hash sha; - sha.Initialize(); - sha.UpdateData(_login); - sha.UpdateBigNumbers(&t1, &_reconnectProof, &K, NULL); - sha.Finalize(); - - if (!memcmp(sha.GetDigest(), reconnectProof->R2, SHA_DIGEST_LENGTH)) - { - // Sending response - ByteBuffer pkt; - pkt << uint8(AUTH_RECONNECT_PROOF); - pkt << uint8(0x00); - pkt << uint16(0x00); // 2 bytes zeros - SendPacket(pkt); - _isAuthenticated = true; - return true; - } - else - { - TC_LOG_ERROR("server.authserver", "'%s:%d' [ERROR] user %s tried to login, but session is invalid.", GetRemoteIpAddress().to_string().c_str(), - GetRemotePort(), _login.c_str()); - return false; - } -} - -bool AuthSession::HandleRealmList() -{ - TC_LOG_DEBUG("server.authserver", "Entering _HandleRealmList"); - - // Get the user id (else close the connection) - // No SQL injection (prepared statement) - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_ID_BY_NAME); - stmt->setString(0, _login); - PreparedQueryResult result = LoginDatabase.Query(stmt); - if (!result) - { - TC_LOG_ERROR("server.authserver", "'%s:%d' [ERROR] user %s tried to login but we cannot find him in the database.", GetRemoteIpAddress().to_string().c_str(), - GetRemotePort(), _login.c_str()); - return false; - } - - Field* fields = result->Fetch(); - uint32 id = fields[0].GetUInt32(); - - // Update realm list if need - sRealmList->UpdateIfNeed(); - - // Circle through realms in the RealmList and construct the return packet (including # of user characters in each realm) - ByteBuffer pkt; - - size_t RealmListSize = 0; - for (RealmList::RealmMap::const_iterator i = sRealmList->begin(); i != sRealmList->end(); ++i) - { - const Realm &realm = i->second; - // don't work with realms which not compatible with the client - bool okBuild = ((_expversion & POST_BC_EXP_FLAG) && realm.gamebuild == _build) || ((_expversion & PRE_BC_EXP_FLAG) && !AuthHelper::IsPreBCAcceptedClientBuild(realm.gamebuild)); - - // No SQL injection. id of realm is controlled by the database. - uint32 flag = realm.flag; - RealmBuildInfo const* buildInfo = AuthHelper::GetBuildInfo(realm.gamebuild); - if (!okBuild) - { - if (!buildInfo) - continue; - - flag |= REALM_FLAG_OFFLINE | REALM_FLAG_SPECIFYBUILD; // tell the client what build the realm is for - } - - if (!buildInfo) - flag &= ~REALM_FLAG_SPECIFYBUILD; - - std::string name = i->first; - if (_expversion & PRE_BC_EXP_FLAG && flag & REALM_FLAG_SPECIFYBUILD) - { - std::ostringstream ss; - ss << name << " (" << buildInfo->MajorVersion << '.' << buildInfo->MinorVersion << '.' << buildInfo->BugfixVersion << ')'; - name = ss.str(); - } - - uint8 lock = (realm.allowedSecurityLevel > _accountSecurityLevel) ? 1 : 0; - - uint8 AmountOfCharacters = 0; - stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_NUM_CHARS_ON_REALM); - stmt->setUInt32(0, realm.m_ID); - stmt->setUInt32(1, id); - result = LoginDatabase.Query(stmt); - if (result) - AmountOfCharacters = (*result)[0].GetUInt8(); - - pkt << realm.icon; // realm type - if (_expversion & POST_BC_EXP_FLAG) // only 2.x and 3.x clients - pkt << lock; // if 1, then realm locked - pkt << uint8(flag); // RealmFlags - pkt << name; - pkt << boost::lexical_cast(realm.GetAddressForClient(GetRemoteIpAddress())); - pkt << realm.populationLevel; - pkt << AmountOfCharacters; - pkt << realm.timezone; // realm category - if (_expversion & POST_BC_EXP_FLAG) // 2.x and 3.x clients - pkt << uint8(realm.m_ID); - else - pkt << uint8(0x0); // 1.12.1 and 1.12.2 clients - - if (_expversion & POST_BC_EXP_FLAG && flag & REALM_FLAG_SPECIFYBUILD) - { - pkt << uint8(buildInfo->MajorVersion); - pkt << uint8(buildInfo->MinorVersion); - pkt << uint8(buildInfo->BugfixVersion); - pkt << uint16(buildInfo->Build); - } - - ++RealmListSize; - } - - if (_expversion & POST_BC_EXP_FLAG) // 2.x and 3.x clients - { - pkt << uint8(0x10); - pkt << uint8(0x00); - } - else // 1.12.1 and 1.12.2 clients - { - pkt << uint8(0x00); - pkt << uint8(0x02); - } - - // make a ByteBuffer which stores the RealmList's size - ByteBuffer RealmListSizeBuffer; - RealmListSizeBuffer << uint32(0); - if (_expversion & POST_BC_EXP_FLAG) // only 2.x and 3.x clients - RealmListSizeBuffer << uint16(RealmListSize); - else - RealmListSizeBuffer << uint32(RealmListSize); - - ByteBuffer hdr; - hdr << uint8(REALM_LIST); - hdr << uint16(pkt.size() + RealmListSizeBuffer.size()); - hdr.append(RealmListSizeBuffer); // append RealmList's size buffer - hdr.append(pkt); // append realms in the realmlist - SendPacket(hdr); - return true; -} - -// Resume patch transfer -bool AuthSession::HandleXferResume() -{ - TC_LOG_DEBUG("server.authserver", "Entering _HandleXferResume"); - //uint8 - //uint64 - return true; -} - -// Cancel patch transfer -bool AuthSession::HandleXferCancel() -{ - TC_LOG_DEBUG("server.authserver", "Entering _HandleXferCancel"); - //uint8 - return false; -} - -// Accept patch transfer -bool AuthSession::HandleXferAccept() -{ - TC_LOG_DEBUG("server.authserver", "Entering _HandleXferAccept"); - //uint8 - return true; -} - -// Make the SRP6 calculation from hash in dB -void AuthSession::SetVSFields(const std::string& rI) -{ - s.SetRand(int32(BufferSizes::SRP_6_S) * 8); - - BigNumber I; - I.SetHexStr(rI.c_str()); - - // In case of leading zeros in the rI hash, restore them - uint8 mDigest[SHA_DIGEST_LENGTH]; - memcpy(mDigest, I.AsByteArray(SHA_DIGEST_LENGTH).get(), SHA_DIGEST_LENGTH); - - std::reverse(mDigest, mDigest + SHA_DIGEST_LENGTH); - - SHA1Hash sha; - sha.UpdateData(s.AsByteArray(uint32(BufferSizes::SRP_6_S)).get(), (uint32(BufferSizes::SRP_6_S))); - sha.UpdateData(mDigest, SHA_DIGEST_LENGTH); - sha.Finalize(); - BigNumber x; - x.SetBinary(sha.GetDigest(), sha.GetLength()); - v = g.ModExp(x, N); - - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_VS); - stmt->setString(0, v.AsHexStr()); - stmt->setString(1, s.AsHexStr()); - stmt->setString(2, _login); - LoginDatabase.Execute(stmt); -} diff --git a/src/server/authserver/Server/AuthSession.h b/src/server/authserver/Server/AuthSession.h deleted file mode 100644 index 07af61d9c1..0000000000 --- a/src/server/authserver/Server/AuthSession.h +++ /dev/null @@ -1,96 +0,0 @@ -/* -* Copyright (C) 2008-2014 TrinityCore -* Copyright (C) 2005-2009 MaNGOS -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with this program. If not, see . -*/ - -#ifndef __AUTHSESSION_H__ -#define __AUTHSESSION_H__ - -#include "Common.h" -#include "ByteBuffer.h" -#include "Socket.h" -#include "BigNumber.h" -#include -#include - -using boost::asio::ip::tcp; - -struct AuthHandler; - -class AuthSession : public Socket -{ -public: - static std::unordered_map InitHandlers(); - - AuthSession(tcp::socket&& socket) : Socket(std::move(socket)), - _isAuthenticated(false), _build(0), _expversion(0), _accountSecurityLevel(SEC_PLAYER) - { - N.SetHexStr("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7"); - g.SetDword(7); - } - - void Start() override - { - AsyncRead(); - } - - void SendPacket(ByteBuffer& packet); - -protected: - void ReadHandler() override; - -private: - bool HandleLogonChallenge(); - bool HandleLogonProof(); - bool HandleReconnectChallenge(); - bool HandleReconnectProof(); - bool HandleRealmList(); - - //data transfer handle for patch - bool HandleXferResume(); - bool HandleXferCancel(); - bool HandleXferAccept(); - - void SetVSFields(const std::string& rI); - - BigNumber N, s, g, v; - BigNumber b, B; - BigNumber K; - BigNumber _reconnectProof; - - bool _isAuthenticated; - std::string _tokenKey; - std::string _login; - std::string _localizationName; - std::string _os; - uint16 _build; - uint8 _expversion; - - AccountTypes _accountSecurityLevel; -}; - -#pragma pack(push, 1) - -struct AuthHandler -{ - uint32 status; - size_t packetSize; - bool (AuthSession::*handler)(); -}; - -#pragma pack(pop) - -#endif diff --git a/src/server/authserver/Server/AuthSocketMgr.h b/src/server/authserver/Server/AuthSocketMgr.h deleted file mode 100644 index a14ee26ed5..0000000000 --- a/src/server/authserver/Server/AuthSocketMgr.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (C) 2008-2014 TrinityCore - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#ifndef AuthSocketMgr_h__ -#define AuthSocketMgr_h__ - -#include "SocketMgr.h" -#include "AuthSession.h" - -void OnSocketAccept(tcp::socket&& sock); - -class AuthSocketMgr : public SocketMgr -{ - typedef SocketMgr BaseSocketMgr; - -public: - static AuthSocketMgr& Instance() - { - static AuthSocketMgr instance; - return instance; - } - - bool StartNetwork(boost::asio::io_service& service, std::string const& bindIp, uint16 port) override - { - if (!BaseSocketMgr::StartNetwork(service, bindIp, port)) - return false; - - _acceptor->AsyncAcceptManaged(&OnSocketAccept); - return true; - } - -protected: - NetworkThread* CreateThreads() const override - { - return new NetworkThread[1]; - } -}; - -#define sAuthSocketMgr AuthSocketMgr::Instance() - -void OnSocketAccept(tcp::socket&& sock) -{ - sAuthSocketMgr.OnSocketOpen(std::forward(sock)); -} - - -#endif // AuthSocketMgr_h__ diff --git a/src/server/authserver/authserver.conf.dist b/src/server/authserver/authserver.conf.dist deleted file mode 100644 index b7dee9ac08..0000000000 --- a/src/server/authserver/authserver.conf.dist +++ /dev/null @@ -1,250 +0,0 @@ -############################################### -# Trinity Core Auth Server configuration file # -############################################### -[authserver] - -################################################################################################### -# SECTION INDEX -# -# EXAMPLE CONFIG -# AUTH SERVER SETTINGS -# MYSQL SETTINGS -# LOGGING SYSTEM SETTINGS -# -################################################################################################### - -################################################################################################### -# EXAMPLE CONFIG -# -# Variable -# Description: Brief description what the variable is doing. -# Important: Annotation for important things about this variable. -# Example: "Example, i.e. if the value is a string" -# Default: 10 - (Enabled|Comment|Variable name in case of grouped config options) -# 0 - (Disabled|Comment|Variable name in case of grouped config options) -# -# Note to developers: -# - Copy this example to keep the formatting. -# - Line breaks should be at column 100. -################################################################################################### - -################################################################################################### -# AUTH SERVER SETTINGS -# -# LogsDir -# Description: Logs directory setting. -# Important: LogsDir needs to be quoted, as the string might contain space characters. -# Logs directory must exists, or log file creation will be disabled. -# Default: "" - (Log files will be stored in the current path) - -LogsDir = "" - -# -# MaxPingTime -# Description: Time (in minutes) between database pings. -# Default: 30 - -MaxPingTime = 30 - -# -# RealmServerPort -# Description: TCP port to reach the auth server. -# Default: 3724 - -RealmServerPort = 3724 - -# -# -# BindIP -# Description: Bind auth server to IP/hostname -# Default: "0.0.0.0" - (Bind to all IPs on the system) - -BindIP = "0.0.0.0" - -# -# PidFile -# Description: Auth server PID file. -# Example: "./authserver.pid" - (Enabled) -# Default: "" - (Disabled) - -PidFile = "" - -# -# UseProcessors -# Description: Processors mask for Windows and Linux based multi-processor systems. -# Example: A computer with 2 CPUs: -# 1 - 1st CPU only, 2 - 2nd CPU only, 3 - 1st and 2nd CPU, because 1 | 2 is 3 -# Default: 0 - (Selected by OS) -# 1+ - (Bit mask value of selected processors) - -UseProcessors = 0 - -# -# ProcessPriority -# Description: Process priority setting for Windows and Linux based systems. -# Details: On Linux, a nice value of -15 is used. (requires superuser). On Windows, process is set to HIGH class. -# Default: 0 - (Normal) -# 1 - (High) - -ProcessPriority = 0 - -# -# RealmsStateUpdateDelay -# Description: Time (in seconds) between realm list updates. -# Default: 20 - (Enabled) -# 0 - (Disabled) - -RealmsStateUpdateDelay = 20 - -# -# WrongPass.MaxCount -# Description: Number of login attemps with wrong password before the account or IP will be -# banned. -# Default: 0 - (Disabled) -# 1+ - (Enabled) - -WrongPass.MaxCount = 0 - -# -# WrongPass.BanTime -# Description: Time (in seconds) for banning account or IP for invalid login attempts. -# Default: 600 - (10 minutes) -# 0 - (Permanent ban) - -WrongPass.BanTime = 600 - -# -# WrongPass.BanType -# Description: Ban type for invalid login attempts. -# Default: 0 - (Ban IP) -# 1 - (Ban Account) - -WrongPass.BanType = 0 - -# -################################################################################################### - -################################################################################################### -# MYSQL SETTINGS -# -# LoginDatabaseInfo -# Description: Database connection settings for the realm server. -# Example: "hostname;port;username;password;database" -# ".;somenumber;username;password;database" - (Use named pipes on Windows -# "enable-named-pipe" to [mysqld] -# section my.ini) -# ".;/path/to/unix_socket;username;password;database" - (use Unix sockets on -# Unix/Linux) -# Default: "127.0.0.1;3306;trinity;trinity;auth" - -LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth" - -# -# LoginDatabase.WorkerThreads -# Description: The amount of worker threads spawned to handle asynchronous (delayed) MySQL -# statements. Each worker thread is mirrored with its own connection to the -# Default: 1 - -LoginDatabase.WorkerThreads = 1 - -# -# Wrong.Password.Login.Logging -# Description: Additionally log attempted wrong password logging -# Default: 0 - (Disabled) -# 1 - (Enabled) - -Wrong.Password.Login.Logging = 0 -# -################################################################################################### - -################################################################################################### -# -# LOGGING SYSTEM SETTINGS -# -# Appender config values: Given a appender "name" -# Appender.name -# Description: Defines 'where to log' -# Format: Type,LogLevel,Flags,optional1,optional2,optional3 -# -# Type -# 0 - (None) -# 1 - (Console) -# 2 - (File) -# 3 - (DB) -# -# LogLevel -# 0 - (Disabled) -# 1 - (Trace) -# 2 - (Debug) -# 3 - (Info) -# 4 - (Warn) -# 5 - (Error) -# 6 - (Fatal) -# -# Flags: -# 0 - None -# 1 - Prefix Timestamp to the text -# 2 - Prefix Log Level to the text -# 4 - Prefix Log Filter type to the text -# 8 - Append timestamp to the log file name. Format: YYYY-MM-DD_HH-MM-SS (Only used with Type = 2) -# 16 - Make a backup of existing file before overwrite (Only used with Mode = w) -# -# Colors (read as optional1 if Type = Console) -# Format: "fatal error warn info debug trace" -# 0 - BLACK -# 1 - RED -# 2 - GREEN -# 3 - BROWN -# 4 - BLUE -# 5 - MAGENTA -# 6 - CYAN -# 7 - GREY -# 8 - YELLOW -# 9 - LRED -# 10 - LGREEN -# 11 - LBLUE -# 12 - LMAGENTA -# 13 - LCYAN -# 14 - WHITE -# Example: "13 11 9 5 3 1" -# -# File: Name of the file (read as optional1 if Type = File) -# Allows to use one "%s" to create dynamic files -# -# Mode: Mode to open the file (read as optional2 if Type = File) -# a - (Append) -# w - (Overwrite) -# -# MaxFileSize: Maximum file size of the log file before creating a new log file -# (read as optional3 if Type = File) -# Size is measured in bytes expressed in a 64-bit unsigned integer. -# Maximum value is 4294967295 (4 gb). Leave blank for no limit. -# NOTE: Does not work with dynamic filenames. -# Example: 536870912 (512 mb) -# - -Appender.Console=1,2,0 -Appender.Auth=2,2,0,Auth.log,w - -# Logger config values: Given a logger "name" -# Logger.name -# Description: Defines 'What to log' -# Format: LogLevel,AppenderList -# -# LogLevel -# 0 - (Disabled) -# 1 - (Trace) -# 2 - (Debug) -# 3 - (Info) -# 4 - (Warn) -# 5 - (Error) -# 6 - (Fatal) -# -# AppenderList: List of appenders linked to logger -# (Using spaces as separator). -# - -Logger.root=3,Console Auth - -# -################################################################################################### diff --git a/src/server/authserver/authserver.ico b/src/server/authserver/authserver.ico deleted file mode 100644 index da318f48a8c2f4dc94507596ec88d0cc4409b32f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 136606 zcmeEP1zc3?(_S#JJFrC&TM<+cQ4qyeKt-@Iu?ssFyF0GkaqaHF?(XimiiMre_srQn zxUR(FRqy@&clY-jPIC6_%)C?YyfYe&g(i+htJQFuRg){8g{G!PqX`Jm9WS1s(e&Xt zcX$1D4~@odhK0u7UVlA@MpN|$|1+!pIGINCCbp#}7oVXe@S)0cWmh@S?L_z2oi}LB z@IQkCp=V4!THXvZ{LkP(=xNHwoi}L-Ap|r1|95a8^wbjE2~mBtylAHT|1J)Mz7c)g zc~VOVA%xREe_{=4r_-Q%S`8|v)}U-E4ct>`P&~N?PDwQ=lthEPi8RQWP=o9VG_Z-U zK^8q^<<<;87YBmhYy`ozfUO>6KbwBvj8!reQcqW*ua@9WF#KqF5Keb> zUueI!kOm71XfQdC2E%h|&^NmVU2HUHlUaj?88q;<)}U${@Uf|fd7yrJejjglcJ)}0X9J@6;}SCanA>@`?S9+;6&gK@bv z7(yQCLpjhfs|L-;XASf`Am1t9Exh1uhQEyiAL7#(RJ;m~1=pgNg%>K2FN6m~4hV>x z5M2=!eR)kA(RI=5BHKsi(qL0z4c0kou!?-JfIKjbJTR6#Fqk~hTh9Y+vS`pelLk!* zjmQrIB7X#$nBj+UAow%{!K=vIIvkfGbF1s+uJD2IfXE8b4MKm>6@_V|i9L`qZlrt= zA^nB+yNc={gxhUJG}uTUSWX_8M_XV@UJXW*H-ra74)i2+%cenBLTB0rDu|uX)eJw3 z1Hox`J;=Vu+t$>%P4#>r^0^vigvf*{dKn<}FHI;#`im|Wz7QUWXq@w0g!FHg*%C*J z$Hrm8A;Nx_*w|AnHZ~WHg_Vw$lmix+Mjn_*dtel8LXi`Z!6;rc!;j%W#+V9%L(#jz zw7rBU+UsR*0LQAxgPN2D!Uw7x5c^Q<0?`lRpT&g!EwjePS$8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<}+q4V;B8~V_@H* zW4rrt(w~R9iP1iNncjav{rF#QGm^PzjXlk@mXUXsIcLo}4zHPCmbqooVD0~<(HHo? zS(r<7^~^7gIiT$tx;^uTGH0l{|I87}{Gg89pl^~7T@d{NRSrnXPw3Um`)JPjNE;OW zo*nre=}Y`3z5LLbHoHT3;W&aXBc{fo+hZ3$=2~ zLM_Z2WUd3fjQ6_U>|?w?9iKJ*w9=xKLUH51LhZCZULV4INRs59Bjl982VP&^!hV*TzmbwuHC=qdwyqpPkaYr zyScYd9Cu>46TkgsVYd@wJs<2l#8!82pE%+QLmaW++UEK)YWgeCU(nn>v8)?{H`TK- zbPPKjk{8tr?gM!NcpqjO5F_(>+tvR^EFr7)Px+IH8!sQHl3YQSqW)4(5c z(;b_USd7GB+!tI~VXhH(O~tSG@OJ4hF%~BPOTw;wo^7QAZCrQ}HbgTGc%DaWz^lJ5 zbQWR(GVW3NiD(|i8H^bVhG%v@@Q1OJe;hwC?1*2du9He5_gYXjm-dOZ zMQkmNuVpv?caBA1NW}uCZ1`={b2n(Pr=jb5Bqo%?gCd{m_Hlk<9y`xXM)mLLJTtKz zKW&-7F*0Kq5x0n#MJ_Z5J?%mRViGCL7Tq@b=+1L7yrVnL3=Axw3#AN972*mxj zk24P9xDdnT+L0e!Fj6uk#u_%ClcEpg1BJ_i@jB_wIRLNeLfjQ%u7n=_$ytc8LVT6W z)eT$~XZyg}P&RJjP0-)kgdIY>5QPf zE?xU#^mp`u!YjuJS6T%`{B!a9SA)J*{a8mm}EV6u6u{=^`*ui(;lX5s91Y< zhShhrPa7BpJ?mu++;rbX``66ISyU=#+tdrGSD1eDvM;S{InQOo2~<{xm)l*oA)BFJ T(nN6@5vdF diff --git a/src/server/authserver/authserver.rc b/src/server/authserver/authserver.rc deleted file mode 100644 index 6ceaa135b4..0000000000 --- a/src/server/authserver/authserver.rc +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (C) 2008-2014 TrinityCore - * Copyright (C) 2005-2009 MaNGOS - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -#include "resource.h" -#include "revision.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "windows.h" //"afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_APPICON ICON "authserver.ico" - -///////////////////////////////////////////////////////////////////////////// -// Neutre (Par défaut système) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUSD) -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT -#pragma code_page(1252) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO -FILEVERSION VER_FILEVERSION -PRODUCTVERSION VER_PRODUCTVERSION - -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK - -#ifndef _DEBUG - FILEFLAGS 0 -#else - #define VER_PRERELEASE VS_FF_PRERELEASE - #define VER_PRIVATEBUILD VS_FF_PRIVATEBUILD - #define VER_DEBUG 0 - FILEFLAGS (VER_PRIVATEBUILD|VER_PRERELEASE|VER_DEBUG) -#endif - -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_APP - -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "080004b0" - BEGIN - VALUE "CompanyName", VER_COMPANYNAME_STR - VALUE "FileDescription", "TrinityCore Authentication Server Daemon" - VALUE "FileVersion", VER_FILEVERSION_STR - VALUE "InternalName", "authserver" - VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR - VALUE "OriginalFilename", "authserver.exe" - VALUE "ProductName", "TrinityCore Authentication Server" - VALUE "ProductVersion", VER_PRODUCTVERSION_STR - END - END - - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x800, 1200 - END -END -#endif diff --git a/src/server/authserver/resource.h b/src/server/authserver/resource.h deleted file mode 100644 index 7dc5cb9ef7..0000000000 --- a/src/server/authserver/resource.h +++ /dev/null @@ -1,15 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by TrinityCore.rc -// - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/src/server/bnetserver/bnetserver.conf.dist b/src/server/bnetserver/bnetserver.conf.dist index 102ddb9906..462bb0cd07 100644 --- a/src/server/bnetserver/bnetserver.conf.dist +++ b/src/server/bnetserver/bnetserver.conf.dist @@ -1,7 +1,7 @@ ############################################### # Trinity Core Auth Server configuration file # ############################################### -[authserver] +[bnetserver] ################################################################################################### # SECTION INDEX @@ -71,7 +71,7 @@ BindIP = "0.0.0.0" # # PidFile # Description: Auth server PID file. -# Example: "./authserver.pid" - (Enabled) +# Example: "./bnetserver.pid" - (Enabled) # Default: "" - (Disabled) PidFile = "" diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 2540ab5c30..cbc9e9b823 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -297,7 +297,7 @@ public: else { handler->PSendSysMessage("[IP2NATION] Table empty"); - TC_LOG_DEBUG("server.authserver", "[IP2NATION] Table empty"); + TC_LOG_DEBUG("server.bnetserver", "[IP2NATION] Table empty"); } } else if (param == "off") diff --git a/src/server/scripts/Commands/cs_battlenet_account.cpp b/src/server/scripts/Commands/cs_battlenet_account.cpp index 79b57cb94f..e98e0f34fd 100644 --- a/src/server/scripts/Commands/cs_battlenet_account.cpp +++ b/src/server/scripts/Commands/cs_battlenet_account.cpp @@ -148,7 +148,7 @@ public: else { handler->PSendSysMessage("[IP2NATION] Table empty"); - TC_LOG_DEBUG("server.authserver", "[IP2NATION] Table empty"); + TC_LOG_DEBUG("server.bnetserver", "[IP2NATION] Table empty"); } } else if (param == "off") diff --git a/src/server/shared/CMakeLists.txt b/src/server/shared/CMakeLists.txt index 1ad85acb60..ddc10ca467 100644 --- a/src/server/shared/CMakeLists.txt +++ b/src/server/shared/CMakeLists.txt @@ -27,7 +27,7 @@ file(GLOB_RECURSE sources_Utilities Utilities/*.cpp Utilities/*.h) file(GLOB sources_localdir *.cpp *.h) # Manually set sources for Debugging directory as we don't want to include WheatyExceptionReport in shared project -# It needs to be included both in authserver and worldserver for the static global variable to be properly initialized +# It needs to be included both in bnetserver and worldserver for the static global variable to be properly initialized # and to handle crash logs on windows set(sources_Debugging Debugging/Errors.cpp Debugging/Errors.h) diff --git a/src/server/shared/Configuration/Config.h b/src/server/shared/Configuration/Config.h index ff0233b566..c2e073c9c0 100644 --- a/src/server/shared/Configuration/Config.h +++ b/src/server/shared/Configuration/Config.h @@ -30,7 +30,7 @@ class ConfigMgr ~ConfigMgr() { } public: - /// Method used only for loading main configuration files (authserver.conf and worldserver.conf) + /// Method used only for loading main configuration files bool LoadInitial(std::string const& file, std::string& error); static ConfigMgr* instance() diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt index 65972e680e..d1283cc8cc 100644 --- a/src/server/worldserver/CMakeLists.txt +++ b/src/server/worldserver/CMakeLists.txt @@ -134,8 +134,8 @@ include_directories( ${CMAKE_SOURCE_DIR}/src/server/game/Warden/Modules ${CMAKE_SOURCE_DIR}/src/server/game/Weather ${CMAKE_SOURCE_DIR}/src/server/game/World - ${CMAKE_SOURCE_DIR}/src/server/authserver/Server - ${CMAKE_SOURCE_DIR}/src/server/authserver/Realms + ${CMAKE_SOURCE_DIR}/src/server/bnetserver/Server + ${CMAKE_SOURCE_DIR}/src/server/bnetserver/Realms ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CommandLine ${CMAKE_CURRENT_SOURCE_DIR}/RemoteAccess diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index e4406e7ecc..6f042f7303 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -3159,7 +3159,7 @@ Logger.sql.sql=5,Console DBErrors #Logger.rbac=3,Console Server #Logger.scripts=3,Console Server #Logger.scripts.ai=3,Console Server -#Logger.server.authserver=3,Console Server +#Logger.server.bnetserver=3,Console Server #Logger.spells=3,Console Server #Logger.sql.dev=3,Console Server #Logger.sql.driver=3,Console Server