#9 ldap.schema.urlfetch ignores credentials

closed
None
2
2006-11-16
2006-11-02
Ronald Oussoren
No

If you pass an URL containing an username/password combination to
ldap.schema.urlfetch that function will ignore the user information which
causes problems when the LDAP server requires authentication.

Solution:
Instead of l.simple_bind('', '') do:

if ldap_url.who:
l.simple_bind_s(ldap_url.who, ldap_url.cred)
else:
l.simple_bind_s('','')

Discussion

    • priority: 5 --> 2
    • assigned_to: nobody --> stroeder
     
    • status: open --> closed
     
  • Logged In: YES
    user_id=64920
    Originator: NO

    I've committed the following patch. Please test.

    Index: Lib/ldap/schema/subentry.py

    RCS file: /cvsroot/python-ldap/python-ldap/Lib/ldap/schema/subentry.py,v
    retrieving revision 1.21
    diff -r1.21 subentry.py
    400c400
    < l.simple_bind_s('','')
    ---
    > l.simple_bind_s(ldap_url.who or '', ldap_url.cred or '')