Skip to content

Commit

Permalink
Add utf-8 as default ldap3 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
w1r0x authored and slipeer committed Jun 15, 2017
1 parent 7c161be commit 0370fbc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions synapse_ldap_password_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
LDAP_AUTH_SIMPLE = ldap3.AUTH_SIMPLE
except AttributeError:
LDAP_AUTH_SIMPLE = ldap3.SIMPLE

try:
ldap3.set_config_parameter('DEFAULT_ENCODING', 'UTF-8')
except AttributeError:
pass
except ldap3.core.exceptions.LDAPConfigurationParameterError:
pass

except ImportError:
ldap3 = None
pass
Expand Down

0 comments on commit 0370fbc

Please sign in to comment.