From: Graham B. <gb...@po...> - 2002-04-23 14:02:29
|
On Tue, Apr 23, 2002 at 06:59:55AM -0700, Kurt D. Zeilenga wrote: > 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. I know this is a bad BER example. What I was trying to show is that the value is decoded into bytes, but the structure holds a reference so that it knows it has to encode it back as #\01\02 Graham. > >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. > >> > |