fix: add sAMAccountName for AD search (#1869)

This commit is contained in:
Yaodong Yu
2023-05-19 21:16:59 +08:00
committed by GitHub
parent af79fdedf2
commit 1260354b36
3 changed files with 5 additions and 2 deletions

View File

@ -211,7 +211,7 @@ func checkLdapUserPassword(user *User, password string, lang string) string {
}
searchReq := goldap.NewSearchRequest(ldapServer.BaseDn, goldap.ScopeWholeSubtree, goldap.NeverDerefAliases,
0, 0, false, ldapServer.buildFilterString(user), []string{}, nil)
0, 0, false, ldapServer.buildAuthFilterString(user), []string{}, nil)
searchResult, err := conn.Conn.Search(searchReq)
if err != nil {