fix(#I22OG7): 修复 MongoDB 无法更改用户密码问题
#Issue https://gitee.com/LongbowEnterprise/BootstrapAdmin/issues/I22OG7
This commit is contained in:
parent
94ffea202f
commit
ec87210310
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue