Jump to content

[10530][Patch] Fix DC after wrong PW in auth server (2.4.3 client)


Guest stfx

Recommended Posts

What bug does the patch fix? What features does the patch add?

Fix the issue that you cant login after you entered a wrong password in auth server (correct account name but wrong password). Seems like the client disconnects from the auth server due to the answer type (0x05 instead of 0x04)

For which repository revision was the patch created?

[s0235] - mangos-0.12 branch

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

no idea

Who has been writing this patch? Please include either forum user names or email addresses.

me, stfx

Tested it with 2.4.3 client and I am pretty sure it does not work on 1.12 as well (untested though). But I am not sure about WOTLK client therefore you might want to change the patch if the same problem exists for WOTLK clients as well.

PS: It also needs to be applied on master

diff --git a/src/realmd/AuthSocket.cpp b/src/realmd/AuthSocket.cpp
@@ -680,15 +680,20 @@
    }
    else
    {
-        if (_build > 6005)                                  // > 1.12.2
+        if (_build > 8606)                                  // > 2.4.3
        {
-            char data[4]= { CMD_AUTH_LOGON_PROOF, WOW_FAIL_INCORRECT_PASSWORD, 3, 0};
+            char data[4] = { CMD_AUTH_LOGON_PROOF, WOW_FAIL_INCORRECT_PASSWORD, 3, 0};
+            send(data, sizeof(data));
+        }
+        else if (_build > 6005)                             // > 1.12.2
+        {
+            char data[4] = { CMD_AUTH_LOGON_PROOF, WOW_FAIL_UNKNOWN_ACCOUNT, 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};
+            char data[2] = { CMD_AUTH_LOGON_PROOF, WOW_FAIL_UNKNOWN_ACCOUNT};
            send(data, sizeof(data));
        }
        BASIC_LOG("[AuthChallenge] account %s tried to login with wrong password!",_login.c_str ());

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use