2980304 Ticket #47402 - Attribute names are incorrect in search results

Authored and Committed by nhosoi 6 years ago
    Ticket #47402 - Attribute names are incorrect in search results
    Bug Description: Attribute list given by a client to ldapsearch
    is first copied to op->o_searchattrs to respect the client input.
    Then the attribute types are normalized and if the list contains
    any forbidden attributes, they are removed from the list.  When
    the search result is returned, the internal normalized attribute
    types are replaced with the original input op->o_searchattrs,
    respectively. Since forbidden attributes are in op->o_searchattrs
    but not in the internal attribute list, wrong type from copy is
    associated to the value and returned to the client.
    Fix Description: This patch removes the forbidden attribute
    before copying the original attribute list to op->o_searchattrs.
    Reviewed by Nathan (Thank you!!)
    (cherry picked from commit 29236cd1000f5f9391db4a39511603b8bed707f2)
file modified
+3 -1