fix: unchanged masked client_secret/password updated to *** (#749)

This commit is contained in:
greenhandatsjtu
2022-05-10 17:37:12 +08:00
committed by GitHub
parent 5dac87a4c3
commit 8efd964835
5 changed files with 27 additions and 5 deletions

View File

@ -314,6 +314,9 @@ func UpdateUser(id string, user *User, columns []string, isGlobalAdmin bool) boo
return false
}
if user.Password == "***" {
user.Password = oldUser.Password
}
user.UpdateUserHash()
if user.Avatar != oldUser.Avatar && user.Avatar != "" && user.PermanentAvatar != "*" {