From e8e89f58fb800014f53341f12505f60ee2b5fb6f Mon Sep 17 00:00:00 2001 From: Shauren Date: Sat, 27 Jul 2019 01:00:37 +0200 Subject: Core/DBLayer: Prevent using prepared statements on wrong database --- src/server/scripts/World/action_ip_logger.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/scripts/World') diff --git a/src/server/scripts/World/action_ip_logger.cpp b/src/server/scripts/World/action_ip_logger.cpp index cf48b45c400..b58938480e9 100644 --- a/src/server/scripts/World/action_ip_logger.cpp +++ b/src/server/scripts/World/action_ip_logger.cpp @@ -136,7 +136,7 @@ class AccountActionIpLogger : public AccountScript { // As we can assume most account actions are NOT failed login, so this is the more accurate check. // For those, we need last_ip... - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ALDL_IP_LOGGING); + LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_ALDL_IP_LOGGING); stmt->setUInt32(0, playerGuid); stmt->setUInt32(1, 0); @@ -147,7 +147,7 @@ class AccountActionIpLogger : public AccountScript } else // ... but for failed login, we query last_attempt_ip from account table. Which we do with an unique query { - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_FACL_IP_LOGGING); + LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_FACL_IP_LOGGING); stmt->setUInt32(0, playerGuid); stmt->setUInt32(1, 0); @@ -228,7 +228,7 @@ class CharacterActionIpLogger : public PlayerScript } // Once we have done everything, we can insert the new log. - PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_CHAR_IP_LOGGING); + LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_CHAR_IP_LOGGING); stmt->setUInt32(0, playerGuid); stmt->setUInt64(1, player->GetGUID().GetCounter()); @@ -286,7 +286,7 @@ public: } // Once we have done everything, we can insert the new log. - PreparedStatement* stmt2 = LoginDatabase.GetPreparedStatement(LOGIN_INS_ALDL_IP_LOGGING); + LoginDatabasePreparedStatement* stmt2 = LoginDatabase.GetPreparedStatement(LOGIN_INS_ALDL_IP_LOGGING); stmt2->setUInt32(0, playerGuid); stmt2->setUInt64(1, guid.GetCounter()); -- cgit v1.2.3