From 9a8241023b6605a5c134a0732804ab3d353bec63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Sun, 3 Dec 2023 23:28:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG:=201.=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=AF=86=E7=A0=81=E4=BF=AE=E6=94=B9,?= =?UTF-8?q?=E6=9C=AA=E5=AF=B9=E5=AF=86=E7=A0=81=E8=BF=9B=E8=A1=8Cmd5?= =?UTF-8?q?=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/dvadmin/system/views/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/dvadmin/system/views/user.py b/backend/dvadmin/system/views/user.py index 8f4a57c..088acac 100644 --- a/backend/dvadmin/system/views/user.py +++ b/backend/dvadmin/system/views/user.py @@ -330,7 +330,7 @@ class UserViewSet(CustomModelViewSet): if not verify_password: verify_password = check_password(hashlib.md5(old_pwd.encode(encoding='UTF-8')).hexdigest(), self.request.user.password) if verify_password: - request.user.password = make_password(new_pwd) + request.user.password = make_password(hashlib.md5(new_pwd.encode(encoding='UTF-8')).hexdigest()) request.user.save() return DetailResponse(data=None, msg="修改成功") else: