Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 44174 invoked from network); 31 Oct 2007 09:38:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Oct 2007 09:38:25 -0000 Received: (qmail 31313 invoked by uid 500); 31 Oct 2007 09:38:13 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 31250 invoked by uid 500); 31 Oct 2007 09:38:12 -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 31239 invoked by uid 99); 31 Oct 2007 09:38:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2007 02:38:12 -0700 X-ASF-Spam-Status: No, hits=-97.8 required=10.0 tests=ALL_TRUSTED,URIBL_RHS_DOB,URI_HEX X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2007 09:38:26 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6DFB071422C for ; Wed, 31 Oct 2007 02:37:51 -0700 (PDT) Message-ID: <31137587.1193823471447.JavaMail.jira@brutus> Date: Wed, 31 Oct 2007 02:37:51 -0700 (PDT) From: "lizongbo (JIRA)" To: dev@directory.apache.org Subject: [jira] Updated: (DIRSERVER-1093) the ResourceRecordEncoder and QuestionRecordEncoder have bug for empty domainName:( In-Reply-To: <4954130.1193823110973.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-1093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] lizongbo updated DIRSERVER-1093: -------------------------------- Attachment: error4trace.jpg error msg > the ResourceRecordEncoder and QuestionRecordEncoder have bug for empty domainName:( > ------------------------------------------------------------------------------------ > > Key: DIRSERVER-1093 > URL: https://issues.apache.org/jira/browse/DIRSERVER-1093 > Project: Directory ApacheDS > Issue Type: Bug > Components: dns > Affects Versions: 1.5.1 > Environment: Windows XP , apacheds-protocol-dns-1.5.1.jar > Reporter: lizongbo > Attachments: error4trace.jpg, testcommand.jpg > > > When I use dig trace for Test the apache dns server. the QuestionRecord and ResourceRecord not encoded right for the empty Domain Name. > my Test command is: > E:\bind>dig @10.108.20.126 618119.com +trace > Then found this bug is caeused by the method "encodeDomainName" in QuestionRecordEncoder.java and "putDomainName" in ResourceRecordEncoder.java. > follow code can be test to get "labels.length == 1"; > [code] > String s = ""; > String[] labels = new String[0]; > labels = s.split("\\."); > System.out.println("labels.length == " + labels.length); > [/code] > so i fix this bug by follow change : > [code] > String[] labels = domainName.split( "\\." ); > [/code] > change to: > [code] > String[] labels = new String[0]; > if (domainName != null && domainName.length() > 0) { > labels = domainName.split("\\."); > } > [/code] > Please fix the bug:) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.