Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5218F176B4 for ; Tue, 30 Sep 2014 13:36:39 +0000 (UTC) Received: (qmail 77867 invoked by uid 500); 30 Sep 2014 13:36:34 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 77814 invoked by uid 500); 30 Sep 2014 13:36:34 -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 77803 invoked by uid 99); 30 Sep 2014 13:36:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Sep 2014 13:36:34 +0000 Date: Tue, 30 Sep 2014 13:36:34 +0000 (UTC) From: "Sorin Sbarnea (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Reopened] (DIRSERVER-1192) Pound sign beginning in a DN throws error MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DIRSERVER-1192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sorin Sbarnea reopened DIRSERVER-1192: -------------------------------------- I think that this bug reappeared in 2.0.0.v20130628, the filter below is accepted but returns nothing (was supposed to return results) {code} (memberOf:1.2.840.113556.1.4.1941:=CN=#GROUP,OU=Americas,DC=example,DC=com) {code} This one throw errors: {code} (memberOf:1.2.840.113556.1.4.1941:=CN=\#GROUP,OU=Americas,DC=example,DC=com) {code} Error: {code} Error while performing search - The filter (memberOf:1.2.840.113556.1.4.1941:=CN=\#Citrix Online All,OU=Contacts,OU=User Accounts,OU=Americas,DC=citrite,DC=net) is invalid. org.apache.directory.api.ldap.model.exception.LdapProtocolErrorException: The filter (...) is invalid. at org.apache.directory.api.ldap.model.message.SearchRequestImpl.setFilter(SearchRequestImpl.java:174) at org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper$3.run(DirectoryApiConnectionWrapper.java:530) {code} > 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 was sent by Atlassian JIRA (v6.3.4#6332)