From 25e561e0c87679c9cc916c00b1efc563ce8dd64c Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Sat, 28 Jun 2014 00:12:02 +0200 Subject: [PATCH] encode passwords in utf8 --- authserv/auth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/authserv/auth.py b/authserv/auth.py index 904631e..87c0349 100644 --- a/authserv/auth.py +++ b/authserv/auth.py @@ -34,6 +34,9 @@ def authenticate(user, service, password, otp_token): if not password: return protocol.ERR_AUTHENTICATION_FAILURE + if isinstance(password, unicode): + password = password.encode('utf-8') + if user.app_specific_passwords_enabled(): if _check_app_specific_password(user.get_app_specific_passwords(service), password) == protocol.OK: -- GitLab