[Zope] [Fwd: [BTreeFolder2] BTree keys corruption problem] Related

FLORAC Thierry thierry.florac at onf.fr
Wed Feb 25 03:00:46 EST 2004


On Tue, 2004-02-24 at 15:20, Max M wrote:

> FLORAC Thierry wrote:
>  >   Hi,
>  >
>  > I posted the following message a few weeks ago, to explain a problem 
> of duplicated keys into a BTreeFolder2 subclass.
>  > After looking for the origins of this problem, I just discovered a 
> possible one :
>  >  - the authentication into my web site is done via an LDAPUserFolder 
> component ;
>  >  - 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 ;
>  >  - 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.
> 
> <span> someid</someid>
> 
> will look exactly the same as
> 
> <span>someid</someid>
> 
> 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 "id.strip()"



  Hi,

That's right and I was quite stupid !!!
By BTreeFolder2 just had false duplicated keys because of these extra
spaces invisible in my HTML page...

In fact, the origin of the problem is my LDAP server, which accept
authentication even when the user ID includes spaces !!
I just thought that this shouldn't be !!  Using a simple "strip" nearly
solved my problem... 

Thanks,

  Thierry


P.S. : I said that my problem was nearly solved because each user
profile is private, so the user identified with the user id "   tflorac"
can't access the profile called "tflorac". Is there any way to alter the
user authentication name ??

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20040225/2fd5a20b/attachment.html


More information about the Zope mailing list