mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[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.
This commit is contained in:
parent
4d3e26a4c0
commit
77a116dbe1
2 changed files with 12 additions and 3 deletions
|
|
@ -680,8 +680,17 @@ bool AuthSocket::_HandleLogonProof()
|
|||
}
|
||||
else
|
||||
{
|
||||
char data[4]= { CMD_AUTH_LOGON_PROOF, WOW_FAIL_UNKNOWN_ACCOUNT, 3, 0};
|
||||
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);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10360"
|
||||
#define REVISION_NR "10361"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue