diff --git a/Projects/Server/Main.cs b/Projects/Server/Main.cs index a292f94bf..79fa61788 100644 --- a/Projects/Server/Main.cs +++ b/Projects/Server/Main.cs @@ -463,7 +463,6 @@ public static class Core // Handle networking NetState.Slice(); - // PingServer.Slice(); // Execute captured post-await methods (like Timer.Pause) LoopContext.ExecuteTasks(); diff --git a/Projects/UOContent/Accounting/Account.cs b/Projects/UOContent/Accounting/Account.cs index 46c2b0071..f4ecb2723 100644 --- a/Projects/UOContent/Accounting/Account.cs +++ b/Projects/UOContent/Accounting/Account.cs @@ -362,13 +362,17 @@ public partial class Account : IAccount, IComparable public void SetPassword(string plainPassword) { - Password = AccountSecurity.CurrentPasswordProtection.EncryptPassword(plainPassword); + var phrase = _passwordAlgorithm is PasswordProtectionAlgorithm.SHA1 or PasswordProtectionAlgorithm.SHA2 + ? $"{_username}{plainPassword}" + : plainPassword; + + Password = AccountSecurity.CurrentPasswordProtection.EncryptPassword(phrase); PasswordAlgorithm = AccountSecurity.CurrentAlgorithm; } public bool CheckPassword(string plainPassword) { - var phrase = _passwordAlgorithm == PasswordProtectionAlgorithm.SHA1 + var phrase = _passwordAlgorithm is PasswordProtectionAlgorithm.SHA1 or PasswordProtectionAlgorithm.SHA2 ? $"{_username}{plainPassword}" : plainPassword;