Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 9216 invoked from network); 6 May 2009 16:00:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 May 2009 16:00:05 -0000 Received: (qmail 25201 invoked by uid 500); 6 May 2009 16:00:05 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 25143 invoked by uid 500); 6 May 2009 16:00:04 -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 25135 invoked by uid 99); 6 May 2009 16:00:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 May 2009 16:00:04 +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; Wed, 06 May 2009 15:59:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B2987234C003 for ; Wed, 6 May 2009 08:59:30 -0700 (PDT) Message-ID: <126457703.1241625570719.JavaMail.jira@brutus> Date: Wed, 6 May 2009 08:59:30 -0700 (PDT) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Subject: [jira] Closed: (DIR-184) DnParser does not correctly parse leading and trailing spaces and pound signs in values. In-Reply-To: <14615324.1145477019874.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/DIR-184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Emmanuel Lecharny closed DIR-184. --------------------------------- > DnParser does not correctly parse leading and trailing spaces and pound signs in values. > ---------------------------------------------------------------------------------------- > > Key: DIR-184 > URL: https://issues.apache.org/jira/browse/DIR-184 > Project: Directory > Issue Type: Bug > Reporter: Jacob S. Barrett > Assignee: Emmanuel Lecharny > Attachments: DIR-184.patch > > > As defined in RFC 2253 section 2.4: > (http://www.ietf.org/rfc/rfc2253.txt) > .. > If the UTF-8 string does not have any of the following characters > which need escaping, then that string can be used as the string > representation of the value. > - a space or "#" character occurring at the beginning of the > string > - a space character occurring at the end of the string > - one of the characters ",", "+", """, "\", "<", ">" or ";" > ... > A string can lead with '\ ' and trail with '\ '. Both cases are not supported by the DnParser and cause a parsing error. Furthermore, if a string starts with '\ ' only the spaces leading up to the escape should be trimmed. In addition only the spaces after '\ ' when at the end of a value should be stripped. > looking at the valuelexer.g file '\#' will work anywhere in the string, but should really only be supported at the head of the string. > If I understand the RFC correctly then these string should be supported: > "\ four spaces leading and 3 trailing \ " -> "\ four spaces leading and 3 trailing \ " > " \ two leading three trailing \ " -> "\ two leading three trailing \ " > "\# a leading pound" -> "\# a pound" > "a middle # pound" -> "a middle # pound" > "a trailing pound #" -> "a trailing pound #" > These are not valid: > "middle\ spaces" > "# a leading pound" > "a middle \# pound" > "a trailing pound \#" > Unless the next line in the RFC is really true, "Implementations MAY escape other characters." This makes things a bit more hairy I think. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.