django4 fixes
This commit is contained in:
parent
4bd1b62e64
commit
e8fa8f6d13
5 changed files with 9 additions and 9 deletions
Binary file not shown.
|
|
@ -51,7 +51,7 @@ msgstr "WLAN-Präsenzerkennung einschalten"
|
|||
|
||||
#: forms.py:68
|
||||
msgid "Old password"
|
||||
msgstr "Neues Passwort"
|
||||
msgstr "Altes Passwort"
|
||||
|
||||
#: forms.py:69
|
||||
msgid "Enter your current password here."
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ def encrypt_ldap_password(cleartext_pw):
|
|||
|
||||
# do the encryption
|
||||
aes = AES.new(key, AES.MODE_CFB, iv)
|
||||
message = iv + aes.encrypt(cleartext_pw)
|
||||
message = iv + aes.encrypt(cleartext_pw.encode())
|
||||
return base64.b64encode(message).decode(), base64.b64encode(key).decode()
|
||||
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ def decrypt_ldap_password(message, key):
|
|||
|
||||
# decrypt it
|
||||
aes = AES.new(decoded_key, AES.MODE_CFB, iv)
|
||||
cleartext_pw = aes.decrypt(ciphertext)
|
||||
cleartext_pw = aes.decrypt(ciphertext).decode()
|
||||
return cleartext_pw
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue