directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DIRSERVER-1192) Pound sign beginning in a DN throws error
Date Tue, 08 Jul 2008 12:07:33 GMT

    [ https://issues.apache.org/jira/browse/DIRSERVER-1192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12611541#action_12611541
] 

Emmanuel Lecharny commented on DIRSERVER-1192:
----------------------------------------------

I have a fix for this issue, but it has the side effect to break another test :

testSearchWithQuotesInBase does not work anymore.

This test does a search using this base DN : String base = "cn=\"Tori Amos\"";

The " around the value are supposed to be unsignificant, but aren't anymore with the fix.

This is very difficult to fix without reviewing the whole DN parsing algorithm.

What I would suggest is that we apply the fix, and deal with the surrounding " later (1.5.4),
taking a chance to review the DN parser in order to speed it up, by applying the idea we had
: we assume that the DN is using ascii chars only, without any specific case (like the escaped
chars and so), and if we can't parse it, we thrown an exception and parse the DN with the
full complex parser. This may boost the DN parsing.

wdyt ?

> Pound sign beginning in a DN throws error
> -----------------------------------------
>
>                 Key: DIRSERVER-1192
>                 URL: https://issues.apache.org/jira/browse/DIRSERVER-1192
>             Project: Directory ApacheDS
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.5.3
>         Environment: Running on windows Under JBOSS
>            Reporter: Steve hammond
>            Assignee: Emmanuel Lecharny
>
> When I create a dn of groupid=\#g1,ou=local,ou=users,ou=rm  it throws out of LdapDN.normalize.
 I have the # escaped (groupid=\#g1) but when it calls rdn.getUpValue in LdapDN.oidNormalize,
it returns "#g1" the backslash is gone, so 3 lines later when it does DefalutStringNormalizer.normalizeString
it sees the # at the front and assumes the g1 is hex, and decodes it to a strange character
that can't be normalized and throws at org.apache.directory.shared.ldap.schema.DeepTrimToLowerNormalizer.normal
> ize(DeepTrimToLowerNormalizer.java:65)
> With Invalid value : ?
> Code sample is:
>           DefaultDirectoryService directoryService = new DefaultDirectoryService();
>           SocketAcceptor socketAcceptor = new SocketAcceptor( null );
>           apacheds = new LdapServer();
>           apacheds.setSocketAcceptor( socketAcceptor );
>           apacheds.setDirectoryService( directoryService );
>           apacheds.setIpPort( ADS_PORT );
>           ads = new ApacheDS(directoryService, apacheds, null);
>           ads.setLdifDirectory(new File(LDIF_DIR).getAbsoluteFile());
>           ads.startup();
>           LdapDN ldn = new LdapDN("groupid=\\#g1,ou=local,ou=users,ou=rm");
>           ldn.normalize(directoryService.getRegistries().getAttributeTypeRegistry().getNormalizerMapping());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message