go-ldap / ldap

Basic LDAP v3 functionality for the GO programming language.
Other
2.19k stars 352 forks source link

feat: add Extended request operations #516

Open cpuschma opened 2 months ago

cpuschma commented 2 months ago

This implements the base for "Extended Requests" as defined in RFC2251 Section 4.12. I'm having trouble getting the requestValue to work, as this seems to get ignored by the server and Wireshark showing errors regarding unexpected fields. Additionally, submitting the requestName as LDAPOID (basically an alias for an BER-encoded OCTET STRING), the server immediately closes the connection without returning an error (tested against Active Directory and OpenLDAP). It works when switching to ber.TagEOC.

I'm open for ideas or anyone who has experience with implementing the "Extended Request" operation!

cpuschma commented 2 months ago

For reference the Wireshark dissection implementation: https://github.com/wireshark/wireshark/blob/bdc5f76203a9091006d3bb8e0101191a8c8f74e6/epan/dissectors/packet-ldap.c#L2836-L2840

Denis-shl commented 1 month ago

@cpuschma hi, I ran into the same problem and I'm working on it now.Tell me, did you manage to implement it?