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

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

FYI, I commented the failing test in server-unit (the one with " around the 
value).

RFC 4514 state that :

Appendix B.  Changes Made since RFC 2253
...
      - Removed specification of additional requirements for LDAPv2
        implementations which also support LDAPv3 (RFC 2253, Section 4)
        as LDAPv2 is now Historic.
...



RFC 2253, Section 4 :

4.  Relationship with RFC 1779 and LDAPv2
...
Implementations MUST allow a value to be surrounded by quote ('"'
   ASCII 34) characters, which are not part of the value.
...



So question : should we consider that cn="test" is valid or not ?

> 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.

Reply via email to