Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix Critical Password Security Vulnerability in Password Update
This PR addresses a critical security vulnerability in the updatePwd method where new passwords were being stored in plaintext rather than being properly encrypted before storage.

References
1Panel-dev/CloudExplorer@7d4dab6

https://nvd.nist.gov/vuln/detail/CVE-2023-3423
  • Loading branch information
th555555 committed May 19, 2025
commit 758e7eca58e0a6f680698cbff3bed28233e47ed0
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ public boolean updatePwd(UserPwd userPwd) throws Exception {
if (!user.getPassword().equals(PasswordUtil.encrypt(userPwd.getPassword(), user.getUsername()))) {
throw new ZhydException("原密码不正确!");
}
user.setPassword(userPwd.getNewPassword());

// Fix: Encrypt the new password before storing it
user.setPassword(PasswordUtil.encrypt(userPwd.getNewPassword(), user.getUsername()));

return this.updateSelective(user);
}
Expand Down