Fix wrong handling of multi value attributes #13

Merged
lx merged 1 commit from Kidswiss/bottin:fix/multivalue_attr into main 2022-02-14 11:13:31 +00:00

View file

@ -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)
} }