Discussion:
Leading and Trailing Spaces
Lon Tierney
2002-12-13 18:51:29 UTC
Permalink
I can't seem to find anything in the RFCs that state if leading or
trailing spaces in attribute values are allowed. The only thing I can find
is in RFC 2849 (LDIF) which says that values ending in a space should be
base64 encoded.

Is it dependent on the particular syntax? If so, would they be allowed in
a Directory String?

Thanks,
-lon
Hallvard B Furuseth
2002-12-13 20:38:13 UTC
Permalink
Post by Lon Tierney
I can't seem to find anything in the RFCs that state if leading or
trailing spaces in attribute values are allowed.
They are.
Post by Lon Tierney
The only thing I can find is in RFC 2849 (LDIF) which says that values
ending in a space should be base64 encoded.
Yes, but that's just in LDIF, not in the protocol.
Post by Lon Tierney
Is it dependent on the particular syntax?
No. However, many string matching rules ignore leading and trailing
space (and treat multiple adjoining whitespace as a single space) when
comparing attribute values. E.g. caseIgnoreMatch, caseExactMatch, and
others, in particular those used on DirectoryString.
--
Hallvard
Kurt D. Zeilenga
2002-12-13 21:09:10 UTC
Permalink
Post by Hallvard B Furuseth
Post by Lon Tierney
I can't seem to find anything in the RFCs that state if leading or
trailing spaces in attribute values are allowed.
They are.
Post by Lon Tierney
The only thing I can find is in RFC 2849 (LDIF) which says that values
ending in a space should be base64 encoded.
Yes, but that's just in LDIF, not in the protocol.
Post by Lon Tierney
Is it dependent on the particular syntax?
No.
Actually, yes, it is dependent on syntax. That is, one can
certainly define a syntax which have very specific space
requirements.
Post by Hallvard B Furuseth
However, many string matching rules ignore leading and trailing
space (and treat multiple adjoining whitespace as a single space) when
comparing attribute values. E.g. caseIgnoreMatch, caseExactMatch, and
others, in particular those used on DirectoryString.
--
Hallvard
Tony Earnshaw
2002-12-13 21:21:26 UTC
Permalink
Post by Lon Tierney
I can't seem to find anything in the RFCs that state if leading or
trailing spaces in attribute values are allowed. The only thing I can find
is in RFC 2849 (LDIF) which says that values ending in a space should be
base64 encoded.
Is it dependent on the particular syntax? If so, would they be allowed in
a Directory String?
Why would you want them?

What is a "Directory String?"

Best,

Tony
--
Tony Earnshaw

When all's said and done ...
there's nothing left to say or do.

e-post: ***@billy.demon.nl
www: http://www.billy.demon.nl
Lon Tierney
2002-12-13 22:00:22 UTC
Permalink
Post by Tony Earnshaw
Why would you want them?
I don't, but I have them anyway... Sometimes things slip through the
cracks, and you end up with a user with a space before/after their name.
A DSML toolkit I was playing with is for some reason base64 encoding them
when they have a leading space when setting, and stripping leading spaces
when reading. I'll call that a bug from the responses I have seen.
Post by Tony Earnshaw
What is a "Directory String?"
I was referring loosely to syntax 1.3.6.1.4.1.1466.115.121.1.15

-lon

Loading...