[
https://issues.apache.org/jira/browse/DIRSERVER-1192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Lecharny resolved DIRSERVER-1192.
------------------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0-M23
This has been fixed 3 years and a half ago, and a test has been added in
{{server-integ}} to check that it now works (see
{{SearchIT.testSearchWithPound()}})
Commit : baff1127c9e9663c06609ecc8568b094ec32a7c0
See also [DIRSTUDIO-1078|https://issues.apache.org/jira/browse/DIRSTUDIO-1078]
that might be fixed.
> 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
> Priority: Major
> Fix For: 2.0.0-M23
>
>
> 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 was sent by Atlassian JIRA
(v7.6.3#76005)