From 93636db0c3b673e494b6ca4d3fdf3ce5070abafc Mon Sep 17 00:00:00 2001 From: "SME,JVO" <> Date: Thu, 6 Aug 2009 14:23:28 +0530 Subject: [PATCH] [FIX] Login : Login and password accepting accented characters lp bug: https://launchpad.net/bugs/409343 fixed bzr revid: jvo@tinyerp.com-20090806085328-os4ymz6mjjp0qw2d --- bin/service/security.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/service/security.py b/bin/service/security.py index b8db107302a..3a4c3c80f61 100644 --- a/bin/service/security.py +++ b/bin/service/security.py @@ -28,9 +28,9 @@ _uid_cache = {} def login(db, login, password): cr = pooler.get_db(db).cursor() if password: - cr.execute('select id from res_users where login=%s and password=%s and active', (login.encode('utf-8'), password.encode('utf-8'))) + cr.execute('select id from res_users where login=%s and password=%s and active', (tools.ustr(login), tools.ustr(password))) else: - cr.execute('select id from res_users where login=%s and password is null and active', (login.encode('utf-8'),)) + cr.execute('select id from res_users where login=%s and password is null and active', (tools.ustr(login),)) res = cr.fetchone() cr.close() if res: