Merge pull request #5 from naominitel/anon-bind-open

Calling .bind() is required even when doing an anonymous bind.
This commit is contained in:
Marco Huenseler 2018-02-11 13:06:30 +01:00 committed by GitHub
commit aab208e7fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,9 +47,9 @@ class Auth(BaseAuth):
if BINDDN and PASSWORD: if BINDDN and PASSWORD:
conn = ldap3.Connection(SERVER, BINDDN, PASSWORD) conn = ldap3.Connection(SERVER, BINDDN, PASSWORD)
conn.bind()
else: else:
conn = ldap3.Connection(SERVER) conn = ldap3.Connection(SERVER)
conn.bind()
try: try:
self.logger.debug("LDAP whoami: %s" % conn.extend.standard.who_am_i()) self.logger.debug("LDAP whoami: %s" % conn.extend.standard.who_am_i())