diff options
| author | Subv <subv2112@gmail.com> | 2014-06-23 16:35:54 -0500 |
|---|---|---|
| committer | Subv <subv2112@gmail.com> | 2014-06-23 16:35:54 -0500 |
| commit | 0db743c4ff2885ae51319c897158cc8774b41a88 (patch) | |
| tree | 06b1e7950dac31b879ae7802d40b7493b0c61ec4 /src/server/authserver | |
| parent | 28b61812cf0d87b84aefaa0889844b6288f93b93 (diff) | |
| parent | aa93a975469cca56e35adc1b5b501f4536be61f1 (diff) | |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into boost
Conflicts:
src/server/authserver/Server/AuthSession.cpp
src/server/game/Server/WorldSession.h
src/server/shared/Packets/ByteBuffer.cpp
src/server/shared/Utilities/Util.h
Diffstat (limited to 'src/server/authserver')
| -rw-r--r-- | src/server/authserver/Authentication/AuthCodes.cpp | 2 | ||||
| -rw-r--r-- | src/server/authserver/Authentication/AuthCodes.h | 2 | ||||
| -rw-r--r-- | src/server/authserver/Server/AuthSession.cpp | 14 | ||||
| -rw-r--r-- | src/server/authserver/authserver.conf.dist | 7 |
4 files changed, 22 insertions, 3 deletions
diff --git a/src/server/authserver/Authentication/AuthCodes.cpp b/src/server/authserver/Authentication/AuthCodes.cpp index bb278dd6653..55517884b8e 100644 --- a/src/server/authserver/Authentication/AuthCodes.cpp +++ b/src/server/authserver/Authentication/AuthCodes.cpp @@ -79,4 +79,4 @@ namespace AuthHelper return NULL; } -}; +} diff --git a/src/server/authserver/Authentication/AuthCodes.h b/src/server/authserver/Authentication/AuthCodes.h index 5e6522f8981..97b4779da0e 100644 --- a/src/server/authserver/Authentication/AuthCodes.h +++ b/src/server/authserver/Authentication/AuthCodes.h @@ -92,6 +92,6 @@ namespace AuthHelper bool IsAcceptedClientBuild(int build); bool IsPostBCAcceptedClientBuild(int build); bool IsPreBCAcceptedClientBuild(int build); -}; +} #endif diff --git a/src/server/authserver/Server/AuthSession.cpp b/src/server/authserver/Server/AuthSession.cpp index 304d593fa3d..5b56a99d640 100644 --- a/src/server/authserver/Server/AuthSession.cpp +++ b/src/server/authserver/Server/AuthSession.cpp @@ -593,10 +593,22 @@ bool AuthSession::_HandleLogonProof() GetRemoteIpAddress().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("Additional.IP.Based.Login.Logging", false)) + { + PreparedStatement* logstmt = LoginDatabase.GetPreparedStatement(LOGIN_INS_FALP_IP_LOGGING); + logstmt->setString(0, _login); + logstmt->setString(1, socket().getRemoteAddress()); + 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); + PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_UPD_FAILEDLOGINS); stmt->setString(0, _login); LoginDatabase.Execute(stmt); diff --git a/src/server/authserver/authserver.conf.dist b/src/server/authserver/authserver.conf.dist index 83edf9669ac..b7dee9ac08b 100644 --- a/src/server/authserver/authserver.conf.dist +++ b/src/server/authserver/authserver.conf.dist @@ -148,6 +148,13 @@ LoginDatabaseInfo = "127.0.0.1;3306;trinity;trinity;auth" LoginDatabase.WorkerThreads = 1 # +# Wrong.Password.Login.Logging +# Description: Additionally log attempted wrong password logging +# Default: 0 - (Disabled) +# 1 - (Enabled) + +Wrong.Password.Login.Logging = 0 +# ################################################################################################### ################################################################################################### |
