fix(#I22OG7): 修复 MongoDB 无法更改用户密码问题

#Issue
https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues/I22OG7
This commit is contained in:
Argo-Cloud 2020-10-26 17:33:03 +08:00
parent 94ffea202f
commit ec87210310
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ namespace Bootstrap.DataAccess.MongoDB
if (Authenticate(userName, password))
{
var passSalt = LgbCryptography.GenerateSalt();
var newPassword = LgbCryptography.ComputeHash(password, passSalt);
var newPassword = LgbCryptography.ComputeHash(newPass, passSalt);
var update = Builders<User>.Update.Set(u => u.Password, newPassword).Set(u => u.PassSalt, passSalt);
DbManager.Users.FindOneAndUpdate(u => u.UserName == UserName, update);
ret = true;