python3: force text on ldap user's cached password
This commit is contained in:
parent
d79cfeabc7
commit
b1349a9496
|
@ -306,7 +306,8 @@ class LDAPUser(User):
|
|||
cache = self.ldap_data.setdefault('password', {})
|
||||
if password is not None:
|
||||
# Prevent eavesdropping of the password through the session storage
|
||||
password = crypto.aes_base64_encrypt(settings.SECRET_KEY, force_bytes(password))
|
||||
password = force_text(crypto.aes_base64_encrypt(
|
||||
settings.SECRET_KEY, force_bytes(password)))
|
||||
cache[self.dn] = password
|
||||
# ensure session is marked dirty
|
||||
self.update_request()
|
||||
|
|
Loading…
Reference in New Issue