Describe the bug
This module doesn't agree with all other ldap client implementations on how to parse a ldapi:// URL. Everyone else expects ldapi://escaped_path/dn where this module reads as ldapi://ignored/path.
For ldapX urls, the "path" portion of the URL is reserved for a DN (e.g. search base), see RFC4516, and for ldapi:// the socket location is supposed be stored in the "host" part. Also see man 5 ldap.conf for example.
To Reproduce
Compare ldapsearch -H ldapi://encoded_path and DialURL("ldapi://encoded_path"), DialURL connects to the "default" path.
And then compare e.g. ldapsearch -H ldapi:///path (will fail) and DialURL("ldapi:///path"), this module uses the DN part of the URL instead.
Expected behavior
Parse ldapi://escaped_path/dn as intended.
Code snippets
See above
Additional context
If (temporary?) backwards compatibility is desired, an ldapi:// URL with an empty "host" part and a path argument containing a / might be considered as existing behaviour.
Describe the bug
This module doesn't agree with all other ldap client implementations on how to parse a
ldapi://URL. Everyone else expectsldapi://escaped_path/dnwhere this module reads asldapi://ignored/path.For ldapX urls, the "path" portion of the URL is reserved for a DN (e.g. search base), see RFC4516, and for ldapi:// the socket location is supposed be stored in the "host" part. Also see man 5 ldap.conf for example.
To Reproduce
Compare
ldapsearch -H ldapi://encoded_pathandDialURL("ldapi://encoded_path"), DialURL connects to the "default" path.And then compare e.g.
ldapsearch -H ldapi:///path(will fail) andDialURL("ldapi:///path"), this module uses the DN part of the URL instead.Expected behavior
Parse
ldapi://escaped_path/dnas intended.Code snippets
See above
Additional context
If (temporary?) backwards compatibility is desired, an ldapi:// URL with an empty "host" part and a path argument containing a
/might be considered as existing behaviour.