[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: I-D ACTION:draft-zeilenga-ldapbis-rfc2253-01.txt



At 05:12 PM 10/30/00 -0700, Jim Sermersheim wrote:
>There are some inconsistencies between the two ways the string is represented in 2.4 and 3.


> 
>2.4 talks about escaping a space character at the beginning or the end of the string. It doesn't say whether multiple spaces each need to be escaped.

They MAY be escaped (like any other character).

        cn=\20 John  Smith \20,dc=example,dc=com

is fine.

>3 includes "#" as a special char but not " ".


" " should not be in special as it would allow:
  cn=\ foo\ ,dc=example,dc=com

which is bogus per 2.4....

>The only time "#" needs to be escaped is when it appears at the beginning of the string.

3's special should be consistent with 2.4's
   o   one of the characters ",", "+", """, "\", "<", ">" or ";"
that is, the '#' should not be listed.  That, is:

  cn=foo#bar,dc=example,dc=com

is fine per 2.4.

>Likewise, the space char should be accounted for.
>Adjust if only the first or last of multiple leading or following spaces needs to be escaped.

No requirement to escape, hence no adjustment needed for space.


How's this:
       
      distinguishedName = [name]
                           ; may be empty

      name              = name-component *("," name-component)

      name-component    = attributeTypeAndValue *("+" attributeTypeAndValue)

      attributeTypeAndValue
                        = attributeType "=" attributeValue

      attributeType     = (ALPHA 1*keychar) / oid

      keychar           = ALPHA / DIGIT / "-"

      oid               = 1*DIGIT *("." 1*DIGIT)

      attributeValue    = string | hexstring

      string            = *( stringchar | pair )

      special           = "," / "=" / "+" / """ / "<" /  ">" / ";"

      pair              = ESC ( ESC / special / hexpair )
      stringchar        = <any character except one of special or ESC>

      hexstring         = "#" 1*hexpair

      hexpair           = HEX HEX

      HEX               = DIGIT
                          / "A" / "B" / "C" / "D" / "E" / "F"
                          / "a" / "b" / "c" / "d" / "e" / "f"

      ALPHA             = <any ASCII alphabetic character>
                           ; decimal 65-90 and 97-122
      DIGIT             = <any ASCII decimal digit>
                           ; decimal 48-57
      ESC               = <the ASCII backslash character "\">
                           ; decimal 92