From 77a116dbe16cd428fcad4a1d7071fb3ef6182c44 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Mon, 16 Aug 2010 04:03:12 +0400 Subject: [PATCH] [10361] Send proper error message at password check fail. It specailly fix 1.x client case that not understande used for later clients 4-byte message. --- src/realmd/AuthSocket.cpp | 13 +++++++++++-- src/shared/revision_nr.h | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/realmd/AuthSocket.cpp b/src/realmd/AuthSocket.cpp index 6f83400eb..0e8afbedb 100644 --- a/src/realmd/AuthSocket.cpp +++ b/src/realmd/AuthSocket.cpp @@ -680,8 +680,17 @@ bool AuthSocket::_HandleLogonProof() } else { - char data[4]= { CMD_AUTH_LOGON_PROOF, WOW_FAIL_UNKNOWN_ACCOUNT, 3, 0}; - send(data, sizeof(data)); + if (_build > 6005) // > 1.12.2 + { + char data[4]= { CMD_AUTH_LOGON_PROOF, WOW_FAIL_INCORRECT_PASSWORD, 3, 0}; + send(data, sizeof(data)); + } + else + { + // 1.x not react incorrectly at 4-byte message use 3 as real error + char data[2]= { CMD_AUTH_LOGON_PROOF, WOW_FAIL_INCORRECT_PASSWORD}; + send(data, sizeof(data)); + } BASIC_LOG("[AuthChallenge] account %s tried to login with wrong password!",_login.c_str ()); uint32 MaxWrongPassCount = sConfig.GetIntDefault("WrongPass.MaxCount", 0); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index cdda517e4..37464b6c7 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10360" + #define REVISION_NR "10361" #endif // __REVISION_NR_H__