From: Kurt D. Z. <Ku...@Op...> - 2002-04-23 14:00:01
|
At 04:32 AM 2002-04-23, Graham Barr wrote: >OK, I made a couple of tweaks and it passes the testsuite. > >One change is that > > CN=#0102 > >Now decodes as { CN => \"\01\02" } That's incorrect. The # format is hex encoded BER. The first octet (01) is the (wrong) tag, the second is the data length (02), and the data is missing. Hence, it cannot be converted to the LDAP-specific encoding of the value. >That is the value is a reference. Ans canonical_dn regenerates it correctly. > >Graham. > >On Tue, Apr 23, 2002 at 11:19:40AM +0100, Graham Barr wrote: >> On Tue, Apr 23, 2002 at 11:21:57AM +0200, Norbert Klasen wrote: >> > --On Freitag, 19. April 2002 08:43 +0100 Graham Barr <gb...@po...> >> > wrote: >> > > Whats wrong with the subs in Net::LDAP::Utils ? >> > >> > ldap_explode_dn does not unescape escaped characters, e.g. the DN 'CN=\#John >> > Smith\ ' becomes >> > $VAR1 = { >> > 'CN' => '\\#John Smith\\20' >> > }; >> > >> > instad of >> > >> > $VAR1 = { >> > 'CN' => '#John Smith ' >> > }; >> >> Hm, I guess canonical_dn needs to be split from usinf explode_dn, >> or explode_dn needs to be told not to expand. Otherwise you cannot tell the difference >> between >> >> CN=#a0 >> >> and >> >> CN=\#a0 >> >> Do all testcases pass with your functions in place of the existing ones ? >> >> Graham. >> |