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

Re: ITS#1998, zero-length attr vals

At 05:38 PM 2002-08-05, Stig Venaas wrote:
>On Mon, Aug 05, 2002 at 05:00:21PM -0700, Howard Chu wrote:
>> Back to this issue again; the crash is actually an assert() because the
>> result
>> of normalizing a single space is a zero-length string. It seems we need to
>> remove these asserts and return a failure code, or just accept the
>> zero-length
>> strings. What's the right thing to do?
>Yes, the asserts should be removed. I suppose it depends on the syntax,
>either invalid syntax error or accept it. I would guess that directory
>string, IA5 string etc allow zero-length, but I don't know for sure.

Well, I rationalized an allow zero-length here based upon
the ASN.1 data type definition.  But, I now conclude that
this actually wrong based upon how X.500 handles similar
types (printable string) and the general principle in X.500
that one doesn't define syntax without semantic.  There
is no clear meaning in LDAP/X.500 of an empty attribute value
of string syntax.

To the best of my knowledge, most* standard attributes of string
syntax do have a non-empty constraint defined for them (though,
on a case by case basis, it may not be obvious where that
constraint is defined).  (The X.500 dnQualifier doesn't, likely
an oversight.)