django-python3-ldap: TLS connection is not started even if `LDAP_AUTH_USE_TLS = True`

After recently having problems while logging in I traced the problem back to changes introduced in version v0.15.0. While debugging it seems that the TLS connection is never started (at least in my environment) and the relevant code was removed in https://github.com/etianen/django-python3-ldap/commit/98b41250d4a925c55aa425a7ec5592e1b3352b4b#diff-27f3dc77469aa232297b4418ae9cbe0cb6fc9f58b5b5be8e32a017a323e0d78cL183-L185. The bind is then refused by the server.

I’m not sure if the idea was that the TLS connection should be started automatically, but after reading ldap3 documentation I think it is only started automatically if the correct auto_bind parameter is specified on the Connection object which doesn’t apply in this case.

If I revert the changes mentioned above it all works again as expected. Maybe someone can confirm this. Thanks.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (13 by maintainers)

Most upvoted comments

Released as 0.15.3

I’ve merged #248 , on the basis you sound like you’ve looked into this ❤️