aboutsummaryrefslogtreecommitdiff
path: root/read.go
diff options
context:
space:
mode:
Diffstat (limited to 'read.go')
-rw-r--r--read.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/read.go b/read.go
index ab80d1c..43833e8 100644
--- a/read.go
+++ b/read.go
@@ -124,7 +124,7 @@ func (server *Server) handleSearchInternal(state *State, w ldap.ResponseWriter,
}
} else if r.Scope() == message.SearchRequestSingleLevel {
objectLevel := len(strings.Split(dn, ","))
- if objectLevel != baseObjectLevel + 1 {
+ if objectLevel != baseObjectLevel+1 {
continue
}
}
@@ -148,7 +148,10 @@ func (server *Server) handleSearchInternal(state *State, w ldap.ResponseWriter,
if len(r.Attributes()) > 0 {
found := false
for _, requested := range r.Attributes() {
- if strings.EqualFold(string(requested), attr) {
+ if string(requested) == "1.1" && len(r.Attributes()) == 1 {
+ break
+ }
+ if string(requested) == "*" || strings.EqualFold(string(requested), attr) {
found = true
break
}