python3: ldap encrypted binddn must be a string type
This commit is contained in:
parent
f8d17c020e
commit
2bbce09b6f
|
@ -272,8 +272,8 @@ class LDAPUser(User):
|
|||
data = dict(self.ldap_data)
|
||||
data['block'] = dict(data['block'])
|
||||
if data['block'].get('bindpw'):
|
||||
data['block']['encrypted_bindpw'] = crypto.aes_base64_encrypt(
|
||||
settings.SECRET_KEY, force_bytes(data['block']['bindpw']))
|
||||
data['block']['encrypted_bindpw'] = force_text(crypto.aes_base64_encrypt(
|
||||
settings.SECRET_KEY, force_bytes(data['block']['bindpw'])))
|
||||
del data['block']['bindpw']
|
||||
session[self.SESSION_LDAP_DATA_KEY] = data
|
||||
|
||||
|
|
Loading…
Reference in New Issue