Compare commits

...

2 Commits

Author SHA1 Message Date
Akkadius d8b5be574f Update client.cpp 2024-08-26 21:59:02 -05:00
Akkadius 4ee73eaf1e Update hash on login 2024-08-26 21:59:02 -05:00
+18
View File
@@ -221,9 +221,27 @@ void Client::Handle_Login(const char *data, unsigned int size)
ParseAccountString(user, user, db_loginserver);
if (server.db->GetLoginDataFromAccountInfo(user, db_loginserver, db_account_password_hash, db_account_id)) {
result = VerifyLoginHash(user, db_loginserver, cred, db_account_password_hash);
#ifdef LSPX
// if user updated their password on the login server, update it here by validating their credentials with the login server
if (!result && db_loginserver == "eqemu") {
uint32 account_id = AccountManagement::CheckExternalLoginserverUserCredentials(user, cred);
if (account_id > 0) {
auto encryption_mode = server.options.GetEncryptionMode();
server.db->UpdateLoginserverAccountPasswordHash(
user,
db_loginserver,
eqcrypt_hash(user, cred, encryption_mode)
);
LogInfo("Updating eqemu account [{}] password hash", account_id);
result = true;
}
}
#endif
LogDebug("Success [{0}]", (result ? "true" : "false"));
}
else {