mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 15:07:03 +01:00
Fix password hashings not being reapplied
This commit is contained in:
@@ -83,7 +83,13 @@ namespace Tgstation.Server.Host.Controllers
|
||||
return Unauthorized();
|
||||
if (user.PasswordHash != originalHash)
|
||||
{
|
||||
DatabaseContext.Users.Attach(user);
|
||||
var updatedUser = new User
|
||||
{
|
||||
Id = user.Id,
|
||||
PasswordHash = originalHash
|
||||
};
|
||||
DatabaseContext.Users.Attach(updatedUser);
|
||||
updatedUser.PasswordHash = user.PasswordHash;
|
||||
await DatabaseContext.Save(cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user