Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 96369 invoked from network); 4 Jul 2008 09:48:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jul 2008 09:48:22 -0000 Received: (qmail 45856 invoked by uid 500); 4 Jul 2008 09:48:19 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 45820 invoked by uid 500); 4 Jul 2008 09:48:19 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 45809 invoked by uid 99); 4 Jul 2008 09:48:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jul 2008 02:48:18 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Jul 2008 09:47:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 69B83234C14F for ; Fri, 4 Jul 2008 02:47:53 -0700 (PDT) Message-ID: <483163907.1215164873430.JavaMail.jira@brutus> Date: Fri, 4 Jul 2008 02:47:53 -0700 (PDT) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Subject: [jira] Commented: (DIRSERVER-1192) Pound sign beginning in a DN throws error In-Reply-To: <259844474.1215116745124.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DIRSERVER-1192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12610505#action_12610505 ] Emmanuel Lecharny commented on DIRSERVER-1192: ---------------------------------------------- Seems like we are not un-escaping escaped chars before normalizing the values, leading to a very bad behaviour. This is definitively a bug. > 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.