Fix wrong handling of multi value attributes #13
1 changed files with 3 additions and 2 deletions
5
read.go
5
read.go
|
@ -213,10 +213,11 @@ func (server *Server) handleSearchInternal(state *State, w ldap.ResponseWriter,
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// Send result
|
// Send result
|
||||||
|
resultVals := []message.AttributeValue{}
|
||||||
for _, v := range val {
|
for _, v := range val {
|
||||||
e.AddAttribute(message.AttributeDescription(attr),
|
resultVals = append(resultVals, message.AttributeValue(v))
|
||||||
message.AttributeValue(v))
|
|
||||||
}
|
}
|
||||||
|
e.AddAttribute(message.AttributeDescription(attr), resultVals...)
|
||||||
}
|
}
|
||||||
w.Write(e)
|
w.Write(e)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue