Fixed another bug with the BCrypt implementation
This commit is contained in:
parent
ec178f0c4a
commit
4bc4b2a6eb
1 changed files with 0 additions and 11 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue