Skip to content

Commit c4a8817

Browse files
authored
Partially revert changes from 98b4125
Explicitly start TLS connection as it doens't happen automatically.
1 parent d91f61c commit c4a8817

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

django_python3_ldap/ldap.py

+3
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ def connection(**kwargs):
202202
return
203203
# Configure.
204204
try:
205+
# Start TLS, if requested.
206+
if settings.LDAP_AUTH_USE_TLS:
207+
c.start_tls(read_server_info=False)
205208
# Perform initial authentication bind.
206209
c.bind(read_server_info=True)
207210
# If the settings specify an alternative username and password for querying, rebind as that.

0 commit comments

Comments
 (0)