Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 33357 invoked from network); 26 Jul 2009 23:49:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Jul 2009 23:49:34 -0000 Received: (qmail 58827 invoked by uid 500); 26 Jul 2009 23:50:39 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 58753 invoked by uid 500); 26 Jul 2009 23:50:39 -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 58737 invoked by uid 99); 26 Jul 2009 23:50:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jul 2009 23:50:39 +0000 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; Sun, 26 Jul 2009 23:50:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CD444234C004 for ; Sun, 26 Jul 2009 16:50:14 -0700 (PDT) Message-ID: <1036666572.1248652214825.JavaMail.jira@brutus> Date: Sun, 26 Jul 2009 16:50:14 -0700 (PDT) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Subject: [jira] Commented: (DIRSERVER-1276) unescaping binary string corrupts values In-Reply-To: <1198545919.1223475584455.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DIRSERVER-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12735440#action_12735440 ] Emmanuel Lecharny commented on DIRSERVER-1276: ---------------------------------------------- Should be fixed with http://svn.apache.org/viewvc?rev=798005&view=rev and http://svn.apache.org/viewvc?rev=798006&view=rev I have to add a test. NOTE : Substring filters with binary AttributeType is *not* implemented. > unescaping binary string corrupts values > ---------------------------------------- > > Key: DIRSERVER-1276 > URL: https://issues.apache.org/jira/browse/DIRSERVER-1276 > Project: Directory ApacheDS > Issue Type: Bug > Components: core > Affects Versions: 1.5.3 > Environment: Windows running under JBOSS > Reporter: Steve hammond > Assignee: Emmanuel Lecharny > Fix For: 1.5.5 > > > When I pass in an escaped string into search, inside ConcreteNameComponentNormalizer, it corrupts the binary values. > passed in > (&(2.5.4.0=person)(objectguid=\29\4C\04\B5\D4\ED\38\46\87\EE\77\58\5C\32\AD\91)) > after normalization interceptor visitor it is: > (&(2.5.4.0=person)(1.2.840.113556.1.4.2='0x29 0x4C 0x04 0xEF 0xBE 0xB5 0xEF 0xBF 0x94 0xEF 0xBF 0xAD 0x38 0x46 0xEF 0xBE ...')) > looks like in ConcreteNameComponentNormalizer line129 byte[] valBytes = unescaped.getBytes( "UTF-8" ); > causes the corruption. The Variable unescaped seems correct and is 16 bytes, valBytes gets created with 30 bytes with the extra data inserted. > The code I am using is: > SearchOperationContext opContext = new SearchOperationContext( > apacheds.getDirectoryService().getRegistries(), > baseDN, > AliasDerefMode.NEVER_DEREF_ALIASES, > FilterParser.parse("(&(objectClass=person)(objectguid=\29\4C\04\B5\D4\ED\38\46\87\EE\77\58\5C\32\AD\91))"), > new SearchControls ( > SearchControls.SUBTREE_SCOPE, > 0, // countlim > 0, // timelim > retAttrs, > false, true)); > NamingEnumeration res = nexus.search(opContext); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.