Very strange problem with module ldapurl
Michael Ströder
michael at stroeder.com
Fri Sep 6 20:27:04 CEST 2002
HI!
I have a very strange problem with ldapurl (my own source, sigh!) which
can also be a security problem in case of passwords stored in
LDAPUrlExtension instances. It drives me crazy!
See this simple source:
------------------------ snip ------------------------
from ldapurl import LDAPUrl,LDAPUrlExtension
l1=LDAPUrl()
l1.hostport='host1'
l1.who='cn=User1'
l1.cred='passwd1'
l1.extensions['dummyext1']=LDAPUrlExtension(
extype='dummyext1',exvalue='dummyvalue1'
)
print 'l1 before creation of l2:\n',str(l1)
l2=LDAPUrl()
l2.hostport='host2'
l2.who='cn=User2'
l2.cred='passwd2'
l2.extensions['dummyext2']=LDAPUrlExtension(
extype='dummyext2',exvalue='dummyvalue2'
)
print 'l1 after creation of l2:\n',str(l1)
print 'l2 itself:\n',str(l2)
------------------------ snip ------------------------
In theory l1 and l2 should be completely independent LDAPUrl instances.
But it seems the LDAPUrl.extensions class attributes are tied by some means.
The problem is the output (with Python 2.2.1):
$ python Tests/ldapurl_instance_error.py
ldap://host1/????dummyext2=dummyvalue2,dummyext1=dummyvalue1,bindname=cn=User2,X-BINDPW=passwd2
ldap://host2/????dummyext2=dummyvalue2,dummyext1=dummyvalue1,bindname=cn=User2,X-BINDPW=passwd2
Anybody here having a clue?
Ciao, Michael.
More information about the python-ldap
mailing list