Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 85858 invoked from network); 19 Apr 2006 23:29:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Apr 2006 23:29:37 -0000 Received: (qmail 91178 invoked by uid 500); 19 Apr 2006 23:29:37 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 91139 invoked by uid 500); 19 Apr 2006 23:29:37 -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 91128 invoked by uid 99); 19 Apr 2006 23:29:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2006 16:29:36 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2006 16:29:36 -0700 Received: from brutus (localhost.localdomain [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 36EAC7142CD for ; Wed, 19 Apr 2006 23:28:35 +0000 (GMT) Message-ID: <25009190.1145489315221.JavaMail.jira@brutus> Date: Wed, 19 Apr 2006 23:28:35 +0000 (GMT+00:00) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Subject: [jira] Commented: (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-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DIR-184?page=comments#action_12375216 ] Emmanuel Lecharny commented on DIR-184: --------------------------------------- What we can do is to allow those leading and trailing '\ ', accordingly to the text : "Implementations MAY escape other characters." A good solution could be to implement this document : http://www.ietf.org/proceedings/01aug/I-D/draft-ietf-ldapbis-dn-06.txt It's section 2.4 states : "... Alternatively, if and only if the character to be escaped is one of ",", "+", """, "\", "<", ">", ";", "#", "=", or " " <----- (has been added to RFC2253) (ASCII 44, 43, 34, 92, 60, 62, 59, 35, or 32, respectively) it can be prefixed by a backslash ('\' ASCII 92). ..." So the " " can be escaped. Could you modify the JIRA report to be an improvment instead of a Major Bug? > DnParser does not correctly parse leading and trailing spaces and pound signs in values. > ---------------------------------------------------------------------------------------- > > Key: DIR-184 > URL: http://issues.apache.org/jira/browse/DIR-184 > Project: Directory > Type: Bug > Reporter: Jacob S. Barrett > Assignee: Alex Karasulu > > 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. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira