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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user