From: Graham B. <gb...@po...> - 2002-04-23 15:08:51
|
I also meant to say that you code, with this change, is already in http://monty.mutatus.co.uk/~gbarr/perl-ldap-0.25_01.tar.gz And it would be helpful if any fixes we done as patches against that distribution. Graham. On Tue, Apr 23, 2002 at 03:59:59PM +0100, Graham Barr wrote: > On Tue, Apr 23, 2002 at 03:33:35PM +0200, Norbert Klasen wrote: > > > > > > --On Dienstag, 23. April 2002 13:42 +0100 Graham Barr <gb...@po...> > > wrote: > > > > >> > CN=#a0 > > >> > > > >> > and > > >> > > > >> > CN=\#a0 > > >> > > >> My version of ldap_explode_dn also unescapes "^#(hexpair)+". > > >> 'CN=#a0' is 'CN=\a0' and 'CN=\#a0' is 'CN=\23a0' > > > > > > But that is the problem 'CN=#a0' and 'CN=\a0' are not the same and > > > should not be made equal. > > > > There are not made equal: > > 'CN=#a0' gets exploded to 'CN' => chr(160); > > 'CN=\#a0' gets exploded to 'CN' => '#a0' > > But you code also expanded > > CN=\a0 to 'CN' => chr(160) > > Which means in canonical_dn both end up as > > CN=\a0 > > which is wrong > > CN=\a0 is not the same as CN=#a0 > > The first is a value of 1 character length and its type, for comaprisons, > is the type of CN. The second is a value of unknown type and so cannot be > compared to the first. > > The #xxxxxx is normally a BER encodeing so to get the examples right > > CN=\01\01\42 is not the same as CN=#010142 nor is it the same > as CN=\42 > > So you need to make sure that DNs of CN=#.... get returned from canonical_dn > as #... and DN that don't start with # do not. > > Graham. > |