directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny" <elecha...@gmail.com>
Subject Missing MatchingRule (for ObjectClass, DN, etc ...)
Date Mon, 08 Oct 2007 12:39:26 GMT
Hi guys,

I have committed ( and reverted) some silly fix for what I thought was
a bug in the server : when you try to filter searches using substring,
like :
(objectClass=org*)
or
(uniqueMember=dc=ex*)

applying the following rule  (RFC 4511, par 4.5.1.7)

"A filter item evaluates to Undefined when the server would not be
   able to determine whether the assertion value matches an entry.
   Examples include:

   - An attribute description in an equalityMatch, substrings,
     greaterOrEqual, lessOrEqual, approxMatch, or extensibleMatch filter
     is not recognized by the server.

   - The attribute type does not define the appropriate matching rule."

we should set the evaluation to undefined. This is not what we have
currently, as we get a NPE if we don't have a defined MatchingRule,
resulting to an undefined Exception :

...
        Normalizer normalizer = type.getSubstr().getNormalizer();
...

    public MatchingRule getSubstr() throws NamingException
    {
        if ( substrOid == null )
        {
            return findSubstr( getSuperior() );
...
    public AttributeType getSuperior() throws NamingException
    {
        if ( superiorOid == null )
        {
            return null;
...

The tests semantics is a little bit biased though.

I have some questions now :
- How does other servers react with such searches ?
- Should we default to EqualityMatch if we don't have a matchingRule
for an AttributeType ?

wdyt ?

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

Mime
View raw message