From 0d473168fd4f79fbff9650ae07d9db2a616fa080 Mon Sep 17 00:00:00 2001 From: AnonymousDotNet <18776095145@163.com> Date: Wed, 18 Sep 2024 15:38:44 +0800 Subject: [PATCH] Modify update password API --- .../BotSharp.Core/Users/Services/UserService.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Infrastructure/BotSharp.Core/Users/Services/UserService.cs b/src/Infrastructure/BotSharp.Core/Users/Services/UserService.cs index 28b1a8ea..b0830d0c 100644 --- a/src/Infrastructure/BotSharp.Core/Users/Services/UserService.cs +++ b/src/Infrastructure/BotSharp.Core/Users/Services/UserService.cs @@ -98,10 +98,9 @@ public class UserService : IUserService return false; } - var salt = Guid.NewGuid().ToString("N"); - record.Password = Utilities.HashTextMd5($"{password}{salt}"); + var newPassword = Utilities.HashTextMd5($"{password}{record.Salt}"); - db.UpdateUserPassword(record.Id, password); + db.UpdateUserPassword(record.Id, newPassword); return true; }