Skip to content

Commit b5faae5

Browse files
committed
fix: change passwd enc. and allow empty oldpasswd
1 parent bd1d096 commit b5faae5

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lires_web/src/components/dashboard/UserCard.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,8 @@
6464
}
6565
6666
// maybe update the password
67-
if (settings_oldPassword.value !== "" || settings_newPassword.value !== "" || settings_confirmNewPassword.value !== ""){
67+
if (settings_newPassword.value !== "" || settings_confirmNewPassword.value !== ""){
6868
// check completeness
69-
if (settings_oldPassword.value === ""){
70-
useUIStateStore().showPopup("Please enter the old password", "error");
71-
return;
72-
}
7369
if (settings_newPassword.value === ""){
7470
useUIStateStore().showPopup("Please enter the new password", "error");
7571
return;
@@ -80,7 +76,7 @@
8076
}
8177
8278
// update the password
83-
if (useSettingsStore().encKey !== sha256(props.userInfo.username + settings_oldPassword.value)){
79+
if (useSettingsStore().encKey !== sha256(props.userInfo.username + sha256(settings_oldPassword.value))){
8480
useUIStateStore().showPopup("The old password is incorrect", "error");
8581
return;
8682
}

0 commit comments

Comments
 (0)