summary refs log tree commit diff
path: root/synapse/util/ldap_auth_provider.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-11-08 14:32:54 +0000
committerErik Johnston <erik@matrix.org>2016-11-08 14:35:25 +0000
commit27d3f2e7ab8e88ef61e930e0b817608863760f92 (patch)
tree34041e45f2249d7b3f426fe61a14654896785be1 /synapse/util/ldap_auth_provider.py
parentMerge branch 'release-v0.18.2' of github.com:matrix-org/synapse (diff)
downloadsynapse-27d3f2e7ab8e88ef61e930e0b817608863760f92.tar.xz
Explicitly set authentication mode in ldap3
This only makes a difference for versions of ldap3 before 1.0, but a)
its best to be explicit and b) there are distributions that package
ancient versions for ldap3 (e.g. debian).
Diffstat (limited to 'synapse/util/ldap_auth_provider.py')
-rw-r--r--synapse/util/ldap_auth_provider.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/util/ldap_auth_provider.py b/synapse/util/ldap_auth_provider.py
index f852e9b037..1b989248fb 100644
--- a/synapse/util/ldap_auth_provider.py
+++ b/synapse/util/ldap_auth_provider.py
@@ -236,7 +236,8 @@ class LdapAuthProvider(object):
                 value=localpart,
                 base=self.ldap_base
             )
-            conn = ldap3.Connection(server, bind_dn, password)
+            conn = ldap3.Connection(server, bind_dn, password,
+                                    authentication=ldap3.AUTH_SIMPLE)
             logger.debug(
                 "Established LDAP connection in simple bind mode: %s",
                 conn