Subject: | ldap_explode_dn issue with special characters |
Date: | Thu, 20 Sep 2012 15:54:08 +0000 |
To: | <bug-perl-ldap [...] rt.cpan.org> |
From: | Chris Card <ctcard [...] hotmail.com> |
According to the LDAP v3 specification, a DN like 'cn=CN\=#a' with an unescaped # character is a valid DN, but the function ldap_explode_dn in Net::LDAP::Util.pm rejects it.
I am using Net::LDAP 0.40 (from perl-LDAP-0.40-1.el6.noarch) on centos 6, with perl 5.10.1, but as far as I can see this bug exists in all versions of Net::LDAP.
This issue seems similar to one reported in the Spring LDAP parser (https://jira.springsource.org/browse/LDAP-229), and comments on that bug indicate that such DNs became valid
in LDAP v3:
"However there were made some significant DN syntax changes for LDAPv3 which are summarized at http://tools.ietf.org/html/rfc4514#appendix-B :
+ did not require escaping of equals sign ('=' U+003D) characters,
+ did not require escaping of non-leading number sign ('#' U+0023) characters,
+ allowed space (' ' U+0020) to be escaped as '\ ',
+ required hex escaping of null (U+0000) characters, and
+ removed LDAPv2-only constructs.
"