Skip to content
Snippets Groups Projects
Commit 25e561e0 authored by ale's avatar ale
Browse files

encode passwords in utf8

parent 0075172f
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,9 @@ def authenticate(user, service, password, otp_token): ...@@ -34,6 +34,9 @@ def authenticate(user, service, password, otp_token):
if not password: if not password:
return protocol.ERR_AUTHENTICATION_FAILURE return protocol.ERR_AUTHENTICATION_FAILURE
if isinstance(password, unicode):
password = password.encode('utf-8')
if user.app_specific_passwords_enabled(): if user.app_specific_passwords_enabled():
if _check_app_specific_password(user.get_app_specific_passwords(service), if _check_app_specific_password(user.get_app_specific_passwords(service),
password) == protocol.OK: password) == protocol.OK:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment