mirror of
https://github.com/navidrome/navidrome.git
synced 2026-05-03 06:51:16 +00:00
Addresses a bug that would prevent users from changing their own passwords, introduced as part of #1187. (#1214)
This commit is contained in:
parent
41f6b68a9a
commit
d40f1dab04
@ -180,6 +180,11 @@ func (r *userRepository) Update(entity interface{}, cols ...string) error {
|
|||||||
u.IsAdmin = false
|
u.IsAdmin = false
|
||||||
u.UserName = usr.UserName
|
u.UserName = usr.UserName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Decrypt the user's existing password before validating. This is required otherwise the existing password entered by the user will never match.
|
||||||
|
if err := r.decryptPassword(usr); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if err := validatePasswordChange(u, usr); err != nil {
|
if err := validatePasswordChange(u, usr); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user