svn commit: samba r18978 - in
idra at samba.org
Fri Sep 29 13:16:52 GMT 2006
On Fri, 2006-09-29 at 09:03 -0400, simo wrote:
> On Thu, 2006-09-28 at 20:44 -0700, Andrew Bartlett wrote:
> > On Thu, 2006-09-28 at 18:53 -0400, simo wrote:
> > > On Thu, 2006-09-28 at 17:06 +0000, abartlet at samba.org wrote:
> > > > Author: abartlet
> > > > Date: 2006-09-28 17:06:38 +0000 (Thu, 28 Sep 2006)
> > > > New Revision: 18978
> > > >
> > > > WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18978
> > > >
> > > > Log:
> > > > Fix bug found by:
> > > > http://www.ee.oulu.fi/research/ouspg/protos/testing/c06/ldapv3/
> > > >
> > > > The issue here is that if the UTF8 conversion fails, because this
> > > > isn't actually UTF8 data, then we need to do a binary compare instead.
> > >
> > > I think we should just fail. Why should we compare wrong data anyway?
> > > Can you give me a valid case where we want to allow invalid utf8
> > > strings?
> > Imagine a qsort() function, based on this comparison: What would happen
> > if two strings always returned '-1' against each other, even if
> > reversed?
> They are invalid utf8 strings, we must not have them on in our tree in
> the first place.
> If the user sends in an invalid utf8 string for comparison I don't care
> either, it's the user fault.
> > I'm not sure there is a valid way to fail this, and given this is the
> > default comparison function, a binary compare seems reasonable to me...
> No, the more I think about it the more I think we should fail the
> comparison, and we also need a way to report failure probably.
We should probably have a way to return LDB_ERR_INVALID_ATTRIBUTE_SYNTAX
Samba Team GPL Compliance Officer
email: idra at samba.org
More information about the samba-technical