Core/Authserver: Removal of sha_pass_hash, compatibility fields, and everything that uses them.

Port From (https://github.com/TrinityCore/TrinityCore/commit/e0e3bae82cfb6c70ba810997104054ab6ca77e99)
This commit is contained in:
hondacrx
2022-04-28 10:34:04 -04:00
parent eb3c5b6f1c
commit 4c6ba41fe8
4 changed files with 4 additions and 79 deletions
-16
View File
@@ -173,11 +173,6 @@ namespace Game
stmt.AddValue(2, accountId);
DB.Login.Execute(stmt);
stmt = DB.Login.GetPreparedStatement(LoginStatements.UPD_LOGON_LEGACY);
stmt.AddValue(0, CalculateShaPassHash(newUsername, newPassword));
stmt.AddValue(1, accountId);
DB.Login.Execute(stmt);
return AccountOpResult.Ok;
}
@@ -199,11 +194,6 @@ namespace Game
stmt.AddValue(2, accountId);
DB.Login.Execute(stmt);
stmt = DB.Login.GetPreparedStatement(LoginStatements.UPD_LOGON_LEGACY);
stmt.AddValue(0, CalculateShaPassHash(username, newPassword));
stmt.AddValue(1, accountId);
DB.Login.Execute(stmt);
return AccountOpResult.Ok;
}
@@ -341,12 +331,6 @@ namespace Game
return result.IsEmpty() ? 0 : (uint)result.Read<ulong>(0);
}
string CalculateShaPassHash(string name, string password)
{
SHA1 sha = SHA1.Create();
return sha.ComputeHash(Encoding.UTF8.GetBytes(name + ":" + password)).ToHexString();
}
public bool IsBannedAccount(string name)
{
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.SEL_ACCOUNT_BANNED_BY_USERNAME);