outposts/ldap: fix queries filtering objectClass with non-lowercase values

closes #2756

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-01-20 11:42:23 +01:00
parent 98485c528e
commit 8deac81364
No known key found for this signature in database
1 changed files with 6 additions and 1 deletions

View File

@ -95,7 +95,12 @@ func IncludeObjectClass(searchOC string, ocs map[string]bool) bool {
return true return true
} }
return ocs[searchOC] for key, value := range ocs {
if strings.EqualFold(key, searchOC) {
return value
}
}
return false
} }
func GetContainerEntry(filterOC string, dn string, ou string) *ldap.Entry { func GetContainerEntry(filterOC string, dn string, ou string) *ldap.Entry {