directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny (Jira) <j...@apache.org>
Subject [jira] [Created] (DIRSERVER-2303) ApplyLdifs treats entries with case sensitivity
Date Thu, 19 Mar 2020 18:35:00 GMT
Emmanuel Lécharny created DIRSERVER-2303:
--------------------------------------------

             Summary: ApplyLdifs treats entries with case sensitivity
                 Key: DIRSERVER-2303
                 URL: https://issues.apache.org/jira/browse/DIRSERVER-2303
             Project: Directory ApacheDS
          Issue Type: Bug
          Components: test
    Affects Versions: 2.0.0.AM26
            Reporter: Emmanuel Lécharny


When an entry injected with {{ApplyLdifs}} uses uppercase {{DN:}} , it's merged with the previous
entry. For instance, witch such a  annotation :

{noformat}
@ApplyLdifs(
    {
        // Entry # 1
        "DN: ou=People,o=isp",
        "objectClass: organizationalUnit",
        "objectClass: top",
        "ou: People",

        "DN: ou=Groups,o=isp",
        "objectClass: organizationalUnit",
        "objectClass: top",
        "ou: Groups",
...
{noformat}

the second entry will not be processed.

This is because the {{DSAnnotationProcessor.applyLdifs()}} method does :

{code:java}
            String dnStart = "dn:";

            StringBuilder sb = new StringBuilder();

            for ( int i = 0; i < ldifs.length; )
            {
                String s = ldifs[i++].trim();
                if ( s.startsWith( dnStart ) )
                {
...
{code}

The string should be lower cased :

{code:java}
                if ( Strings.toLowerCaseAscii( s ).startsWith( dnStart ) )
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@directory.apache.org
For additional commands, e-mail: dev-help@directory.apache.org


Mime
View raw message