From 93d8578d55212a2e65aefcb531a04c612df89516 Mon Sep 17 00:00:00 2001 From: Chris Mann Date: Fri, 18 Aug 2023 11:29:52 +0200 Subject: [PATCH] Bug fixed --- model-passwd.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/model-passwd.go b/model-passwd.go index 2f31792..7d3066e 100644 --- a/model-passwd.go +++ b/model-passwd.go @@ -68,13 +68,12 @@ func passwordLost(user User, config *ConfigFile, ldapConn *ldap.Conn) error { err = ldapConn.Del(delReq) user.Password = suggestPassword() - code := b64.URLEncoding.EncodeToString([]byte(user.UID + ";" + user.Password)) - user.DN = "uid=" + searchRes.Entries[0].GetAttributeValue("cn") + "," + config.InvitationBaseDN user.UID = searchRes.Entries[0].GetAttributeValue("cn") user.CN = searchRes.Entries[0].GetAttributeValue("cn") user.Mail = searchRes.Entries[0].GetAttributeValue("mail") user.OtherMailbox = searchRes.Entries[0].GetAttributeValue("carLicense") + code := b64.URLEncoding.EncodeToString([]byte(user.UID + ";" + user.Password)) /* Check for outstanding invitation */ searchReq = ldap.NewSearchRequest(config.InvitationBaseDN, ldap.ScopeSingleLevel, ldap.NeverDerefAliases, 0, 0, false, "(uid="+user.UID+")", []string{"seeAlso"}, nil)