directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@iktek.com>
Subject Re: [jira] Resolved: (DIRLDAP-35) LdapName comparison must be case-insensitive for attibutType
Date Sat, 19 Feb 2005 18:57:12 GMT
Sorry, vincent, but I think that it's no enough to compareToIgnoreCase
on each RDN. We had a very intersting chat session 2 weeks ago with Alex
and Alan, and as far as I remember, one *must* compare RDN attributes in
a CIS way, BUT check for RDN values matching rules befare stating that
two DNs are equals.  For instance :

A=V1, b=V2 == a=V1, b=v2 if and only if :
1) each RDN should be present in both DN
2) each RDN should be at the same position in both DN
3) each RDN attributes name should be CIS-equals
4) each RDN Values shlould be equals using the matching rule of its RDN
attribute
5) if a RDN has more than one attribute, all of thoses attributes and
values should be equals with those on the other RDN, but the attributes
order is of no importance.

for instance :
A=V1 		equals a=V1
A=V1, B=V2 	equals a=V1, b=V2
A=V1 + B=V2	equals b=V2 + a=V1

but :
A=V1 equals A=v1 only if A matching rule is case insensitive


Le samedi 19 février 2005 à 19:32 +0100, Vincent Tence (JIRA) a écrit :
>      [ http://issues.apache.org/jira/browse/DIRLDAP-35?page=history ]
>      
> Vincent Tence resolved DIRLDAP-35:
> ----------------------------------
> 
>       Assign To: Vincent Tence  (was: Alex Karasulu)
>      Resolution: Fixed
>     Fix Version: 0.8.1
> 
> This should be fixed now in the trunk thanks to your TestCase. Good work Emmanuel!
> 
> > LdapName comparison must be case-insensitive for attibutType
> > ------------------------------------------------------------
> >
> >          Key: DIRLDAP-35
> >          URL: http://issues.apache.org/jira/browse/DIRLDAP-35
> >      Project: Directory LDAP
> >         Type: Bug
> >   Components: Common
> >     Reporter: Emmanuel Lecharny
> >     Assignee: Vincent Tence
> >      Fix For: 0.8.1
> 
> >
> > While comparing two DNs, the AttributeType of each RDN must be compared in a case-insensitive
way : RFC 2251, chap. 4.1.4, par.4.
> > It could be tricky to perform a valid comparison :
> > A=V1+B=V2,C=GB and A=V1+b=V2,C=GB are equals in regards with the RFC,
> > A=V1+B=V2,C=GB and A=V1+C=V2,C=GB are differents in regards with the RFC.
> > LdapName.compareTo function does not return a valid result :
> >         Name n1 = new DnParser().parse("A=V");
> >         Name n2 = new DnParser().parse("a=V");
> >         int val = n1.compareTo(n2);  // val = 0xffffffe0 instead of 0
> 



Mime
View raw message