[turba] couple things

Andrew Morgan morgan at orst.edu
Mon Jan 13 16:29:18 PST 2003



On Mon, 13 Jan 2003, Chuck Hagenbuch wrote:

> Quoting Andrew Morgan <morgan at orst.edu>:
>
> >    In encodings where an arbitrary string, not a Distinguished Name, is
> >    used as part of a larger production, and other than as part of a
> >    Distinguished Name, a backslash quoting mechanism is used to escape
> >    the following separator symbol character (such as "'", "$" or "#") if
> >    it should occur in that string.  The backslash is followed by a pair
> >    of hexadecimal digits representing the next character.  A backslash
> >    itself in the string which forms part of a larger syntax is always
> >    transmitted as '\5C' or '\5c'. An example is given in section 6.27.
> >
> > So to put a "$" in a string, it would be encoded as "\24", the hex value
> > of $ preceeded by a backslash.
>
> Great, thanks. Anyone want to turn this into a patch for the LDAP driver
> (actually, for all of our LDAP drivers)?
>
> -chuck

Ummm, I don't think this belongs in the LDAP driver, although maybe I
misunderstand how the Turba code works.  The "$" only means "newline" in
the context of a postal address attribute.  For other ldap attributes, a
dollar sign should just be treated as a normal character, no need to
escape.  Also, the "$" as a newline character is just a convention.  The
LDAP server does not interpret the "$" as any special when it is storing
it or sending the value to the client.  The client is responsible for
treating a "$" as a newline character.

So we shouldn't encode all "$" characters used in LDAP, only for
attributes defined as containing postal addresses.

Maybe this is all already obvious to you, but do you have any suggestions
with how to deal with this problem?  Adding some sort of "postal address"
flag to each Turba attribute seems a little complex.

	Andy



More information about the turba mailing list