From 5e141ac920bb4866a377904a7dec608a7e119218 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Tue, 12 Sep 2017 20:26:03 +0200 Subject: Network: Fix logging into older worlds with base64 hashes --- src/network/clientpackethandler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/network/clientpackethandler.cpp') diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 6683af471..3ff23453d 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -86,7 +86,8 @@ void Client::handleCommand_Hello(NetworkPacket* pkt) // we recieved a TOCLIENT_HELLO while auth was already going on errorstream << "Client: TOCLIENT_HELLO while auth was already going on" << "(chosen_mech=" << m_chosen_auth_mech << ")." << std::endl; - if (m_chosen_auth_mech == AUTH_MECHANISM_SRP) { + if (m_chosen_auth_mech == AUTH_MECHANISM_SRP || + m_chosen_auth_mech == AUTH_MECHANISM_LEGACY_PASSWORD) { srp_user_delete((SRPUser *) m_auth_data); m_auth_data = 0; } @@ -1294,7 +1295,8 @@ void Client::handleCommand_UpdatePlayerList(NetworkPacket* pkt) void Client::handleCommand_SrpBytesSandB(NetworkPacket* pkt) { - if (m_chosen_auth_mech != AUTH_MECHANISM_SRP) { + if (m_chosen_auth_mech != AUTH_MECHANISM_SRP && + m_chosen_auth_mech != AUTH_MECHANISM_LEGACY_PASSWORD) { errorstream << "Client: Received SRP S_B login message," << " but wasn't supposed to (chosen_mech=" << m_chosen_auth_mech << ")." << std::endl; -- cgit v1.2.3