Fixed another bug with the BCrypt implementation

This commit is contained in:
White 2015-05-28 16:44:34 +09:30
parent ec178f0c4a
commit 4bc4b2a6eb

View file

@ -465,17 +465,6 @@ namespace TShockAPI.DB
// Save the old password, in the event that we have to revert changes.
string oldpassword = Password;
// Convert the password to BCrypt, and save it.
try
{
Password = BCrypt.Net.BCrypt.HashPassword(password, TShock.Config.BCryptWorkFactor);
}
catch (ArgumentOutOfRangeException)
{
TShock.Log.ConsoleError("Invalid BCrypt work factor in config file! Upgrading user password to BCrypt using default work factor.");
Password = BCrypt.Net.BCrypt.HashPassword(password);
}
try
{
TShock.Users.SetUserPassword(this, Password);