directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@gmail.com>
Subject Modification on shared LDAPDN...
Date Mon, 04 Jan 2010 10:27:52 GMT
Hi,

we have modified the LdapDN parsers those last two days, due to some 
inconsistencies and errors in handling some specific corner cases 
(escaped characters, heading and trailing chars). Those errors are 
causing errors in some tests in server-integ, so we had to fix them. 
It's not totally finished, but close to be.

Here are the expected consequences when a LdapDN is parsed :

<DN> ::= (<RDN> ((',' | ';') <RDN>)*)+
<RDN> ::= <AVA> ('+' <AVA>)*
<AVA> ::= AT '=' <value>

DN :
upName : the initial DN (escaped String)
normName : the normalized DN (escaped String)

RDN :
upName : The initial RDN, with heading and trailing spaces (escaped String)
normName : The normalized RDN, trimmed (escaped String)

AVA :
upName : The initial AVA, with heading and trailing spaces (escaped String)
normName : The normalized AVA, trimmed (escaped String)
upType : The initial type, trimmed
normType : the normalized type
upValue : the initial value, trimmed, no escaped chars
normValue : the normalized value, no escaped chars

DN = "  CN  =  Ex\\+mple + cn = T\\+ST ,  cn  =  COM "
      0         1        2         3         4
      01234567890123457890123456789012345678901234567

CN normalized := 2.5.4.11

DN (0..47):
upName (0..47):= "  CN  =  Ex\\+mple + cn = T\\+ST ,  cn  =  COM "
normName := "2.5.4.11=ex\+mple+2.5.4.11=t\+st,2.5.4.11=com"

RDN 1 (0..33) :
upName (0..33): "  CN  =  Ex\\+mple + cn = T\\+ST "
normName : "2.5.4.11=ex\+mple+2.5.4.11=t\+st"

RDN 2 (35..47) :
upName (35..47): "  cn  =  COM "
normName : "2.5.4.11=com"

AVA 1-1 (0..19) :
upName (0..19): "  CN  =  Ex\\+mple "
normName : "2.5.4.11=ex\\+mple"
upType (2..3): "CN"
normType : "cn"
upValue (7..19): "  Ex+mple "
normValue : "ex+mple"

AVA 1-2 (21..33) :
upName (21..33): " cn = T\\+ST "
normName : "2.5.4.11=t\\+st"
upType (22..23): "cn"
normType : "cn"
upValue (26..33):  " T+ST "
normValue : "t+st"

AVA 2 (35..47) :
upName (35..47): "  cn  =  COM "
normName : "2.5.4.11=com"
upType (37..38): "cn"
normType : "cn"
upValue (42..47): "  COM "
normValue : "com"

We also have refactored some methods, and deprecated others, added some 
new constructors too.

As the work is not completely achieved, expect some instability for one 
more day.

-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.nextury.com



Mime
View raw message