diff --git a/TShockAPI/DB/UserManager.cs b/TShockAPI/DB/UserManager.cs index 4cc5cf29..1450e4c8 100755 --- a/TShockAPI/DB/UserManager.cs +++ b/TShockAPI/DB/UserManager.cs @@ -444,6 +444,10 @@ namespace TShockAPI.DB { if (HashPassword(password).ToUpper() == this.Password.ToUpper()) { + // Return true to keep blank passwords working but don't convert them to bcrypt. + if (this.Password == "non-existant password") { + return true; + } // The password is not stored using BCrypt; upgrade it to BCrypt immediately UpgradePasswordToBCrypt(password); return true; @@ -592,7 +596,7 @@ namespace TShockAPI.DB protected string HashPassword(string password) { if (string.IsNullOrEmpty(password) || password == "non-existant password") - return null; + return "non-existant password"; return HashPassword(Encoding.UTF8.GetBytes(password)); }