提交 0254a4ec 编写于 作者: 7 710leo

refactor: ldap search request

上级 6d24b075
......@@ -87,8 +87,8 @@ func ldapReq(user, pass string) (*ldap.SearchResult, error) {
searchRequest := ldap.NewSearchRequest(
lc.BaseDn, // The base dn to search
ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false,
fmt.Sprintf(lc.AuthFilter, user), // The filter to apply
genLdapAttributeSearchList(), // A list attributes to retrieve
fmt.Sprintf(lc.AuthFilter, ldap.EscapeFilter(user)), // The filter to apply
genLdapAttributeSearchList(), // A list attributes to retrieve
nil,
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册