Don't allow old password to be empty during password update

merge-requests/6/head
meskio 5 years ago
parent 418eb23c5e
commit d86d6f7eb2
Signed by: meskio
GPG Key ID: 52B8F5AC97A2DA86
  1. 4
      ldap/user.go

@ -30,6 +30,10 @@ func (l *Ldap) ValidateUser(user string, pass string) error {
// ChangePass changes logged in user's password
func (l *Ldap) ChangePass(user string, oldpass string, newpass string) error {
if oldpass == "" {
return errors.New("Old password can not be empty")
}
conn, err := l.login(user, oldpass)
if err != nil {
return err

Loading…
Cancel
Save