mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-24 20:28:06 +02:00
20 lines
409 B
Go
20 lines
409 B
Go
// Baseline: filter is a literal string, no taint reaches NewSearchRequest.
|
|
package ldap_baseline
|
|
|
|
import (
|
|
"github.com/go-ldap/ldap/v3"
|
|
)
|
|
|
|
func Lookup() {
|
|
conn, _ := ldap.DialURL("ldap://example.com")
|
|
req := ldap.NewSearchRequest(
|
|
"ou=people,dc=example,dc=com",
|
|
ldap.ScopeWholeSubtree,
|
|
ldap.NeverDerefAliases,
|
|
0, 0, false,
|
|
"(objectClass=person)",
|
|
[]string{"cn"},
|
|
nil,
|
|
)
|
|
conn.Search(req)
|
|
}
|