directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Lecharny (JIRA)" <directory-...@incubator.apache.org>
Subject [jira] Commented: (DIR-184) DnParser does not correctly parse leading and trailing spaces and pound signs in values.
Date Wed, 19 Apr 2006 22:46:39 GMT
    [ http://issues.apache.org/jira/browse/DIR-184?page=comments#action_12375208 ] 

Emmanuel Lecharny commented on DIR-184:
---------------------------------------

Hi Jacob,

Jira had a problem lately, so it has lost my previous comment ... Hopefully, you added yours,
so I wo'nt have to reply to the whole samples ;)

Regarding the spaces, and the 2.4 section, there is something confusing in RFC2253. If you
read carefully the section 3, you will see that the gramar tells that there are no way to
produce a DN with an attributeValue starting or ending with a '\ '. So this leads to the conclusion
that section 2.4 and section 3 are contradictory.

wdyt ?

> 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


Mime
View raw message