All users were logged out of Bugzilla on October 13th, 2018

Mozilla::LDAP::Conn should support IPv6 addresses



8 years ago
8 years ago


(Reporter: nkinder, Unassigned)


Firefox Tracking Flags

(Not tracked)




8 years ago
The Mozilla::LDAP::Conn constructor currently doesn't work properly with IPv6.

When PerLDAP is built against MozLDAP client libraries, both an IPv6 address or a hostname that maps to an IPv6 address will fail to connect.  This seems to be related to teh way ldap_init() is used, which doesn't appear to work properly with IPv6.  We should use MozLPDA routines that support IPv6 in the ldap_init() stub.

When PerLDAP is built against OpenLDAP client libraries, usign a hostname that maps to an IPv6 address does work correctly, but an IPv6 address does not.  The problem is that ldap_initialize() us used behind the scenes in the ldap_init() stub.  A LDAP URL is created and passed to ldap_initialize(), but we don't URL encode the ":" characters in the address first.  This results in a LDAP_PARAM_ERROR being returned.  The fix is to have the ldap_init() stub URL encode the ":" characters prior to creating the URL that we pass to ldap_initialize().  If you replace the ":" chars with "%3A", everything works correctly.
You need to log in before you can comment on or make changes to this bug.