Skip to content

Commit b58c26e

Browse files
authored
Merge pull request #930 from fastrde/fix_scope_whole_subtree
fix(ldap): ScopeWholeSubtree wasn't handled by serveSearch
2 parents 18072ee + a51b2c6 commit b58c26e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

providers/directory/search.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ func (d *Directory) serveSearch(rw ldap.ResponseWriter, r *ldap.Request) {
8080
if dn := strings.Join(parts[1:], ","); dn != msg.BaseDN {
8181
continue
8282
}
83+
case ldap.ScopeWholeSubtree:
84+
if !strings.HasSuffix(strings.ToLower(e.Dn), strings.ToLower(msg.BaseDN)) {
85+
continue
86+
}
8387
}
8488
if d.skip(&e, msg.BaseDN) {
8589
continue

0 commit comments

Comments
 (0)