<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.9">
</HEAD>
<BODY>
On Tue, 2004-02-24 at 15:20, Max M wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#40a3c5"><I>FLORAC Thierry wrote:
 &gt;   Hi,
 &gt;
 &gt; I posted the following message a few weeks ago, to explain a problem 
of duplicated keys into a BTreeFolder2 subclass.
 &gt; After looking for the origins of this problem, I just discovered a 
possible one :
 &gt;  - the authentication into my web site is done via an LDAPUserFolder 
component ;
 &gt;  - for an unknown reason (I don't know LDAP very much !), if a user 
authenticate himself using spaces before or after his user name, 
authentication is OK ;
 &gt;  - if I try to create a new entry into my profiles folder using this 
user name (including spaces !), the entry is created into the 
BTreeFolder2 without spaces, and that seems to create duplicated keys !!


You should verify that you do indeed have duplicate keys.

In html you cannot see the spaces first and last in the keys.

&lt;span&gt; someid&lt;/someid&gt;

will look exactly the same as

&lt;span&gt;someid&lt;/someid&gt;

in a browser.

If you choose view source you should be able to determine if it is 
indeed so.


I don't believe that The BTreeFolder makes duplicate keys, but the other 
problem is very likely. And one I have made myself from time to time, 
when forgetting to do an &quot;id.strip()&quot;</I></FONT></PRE>
</BLOCKQUOTE>
<BR>
<BR>
&nbsp; Hi,<BR>
<BR>
That's right and I was quite stupid !!!<BR>
By BTreeFolder2 just had false duplicated keys because of these extra spaces invisible in my HTML page...<BR>
<BR>
In fact, the origin of the problem is my LDAP server, which accept authentication even when the user ID includes spaces !!<BR>
I just thought that this shouldn't be !!&nbsp; Using a simple &quot;strip&quot; nearly solved my problem... <BR>
<BR>
Thanks,<BR>
<BR>
&nbsp; Thierry<BR>
<BR>
<BR>
P.S. : I said that my problem was nearly solved because each user profile is private, so the user identified with the user id &quot;&nbsp;&nbsp; tflorac&quot; can't access the profile called &quot;tflorac&quot;. Is there any way to alter the user authentication name ??<BR>
<BR>
</BODY>
</HTML>