Am 19.07.2011 16:43 schrieb jo:
I'm trying to configure LDAP in my tg 1.1, in this way:

I guess you're using the recipe here:
http://www.turbogears.org/1.1/docs/Identity/Recipes.html?authenticate-against-an-ldap-server#authenticate-against-an-ldap-server

The problem seems to be that the validate_password method of the custom identity does not catch the NO_SUCH_OBJECT error. Earlier LDAP versions probably just returned an empty list instead so that was not needed.

It should be easy to fix this. Edit the validate_password method of your custom identity provider (/home/jose/trunk/sicer/lib/identity.py)
and change the line

    objects = ldapcon.result(rc)[1]

to

    try:
        objects = ldapcon.result(rc)[1]
    except ldap.NO_SUCH_OBJECT:
        objects = []

-- Christoph

--
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to