1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-23 15:19:42 +02:00

Use paging for LDAP queries

This commit is contained in:
sauls8t 2018-09-07 15:09:54 +01:00
parent ae084ae0bb
commit e03497032b
3 changed files with 674 additions and 666 deletions

View file

@ -74,6 +74,13 @@ const (
EncryptionTypeStartTLS = "starttls"
)
const (
// MaxPageSize controls how many query results are
// fetched at once from the LDAP server.
// See https://answers.splunk.com/answers/1538/what-is-ldap-error-size-limit-exceeded.html
MaxPageSize = 250
)
// Clean ensures configuration data is formatted correctly.
func (c *LDAPConfig) Clean() {
c.BaseDN = strings.TrimSpace(c.BaseDN)