From b5faae565bcb803d274f3780d0b60758d03e5325 Mon Sep 17 00:00:00 2001 From: limengxun Date: Fri, 17 Nov 2023 17:53:30 +0800 Subject: [PATCH] fix: change passwd enc. and allow empty oldpasswd --- lires_web/src/components/dashboard/UserCard.vue | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lires_web/src/components/dashboard/UserCard.vue b/lires_web/src/components/dashboard/UserCard.vue index 4bc6f191..badcb016 100644 --- a/lires_web/src/components/dashboard/UserCard.vue +++ b/lires_web/src/components/dashboard/UserCard.vue @@ -64,12 +64,8 @@ } // maybe update the password - if (settings_oldPassword.value !== "" || settings_newPassword.value !== "" || settings_confirmNewPassword.value !== ""){ + if (settings_newPassword.value !== "" || settings_confirmNewPassword.value !== ""){ // check completeness - if (settings_oldPassword.value === ""){ - useUIStateStore().showPopup("Please enter the old password", "error"); - return; - } if (settings_newPassword.value === ""){ useUIStateStore().showPopup("Please enter the new password", "error"); return; @@ -80,7 +76,7 @@ } // update the password - if (useSettingsStore().encKey !== sha256(props.userInfo.username + settings_oldPassword.value)){ + if (useSettingsStore().encKey !== sha256(props.userInfo.username + sha256(settings_oldPassword.value))){ useUIStateStore().showPopup("The old password is incorrect", "error"); return; }