[FIX] auth_ldap: remove insignificant spaces in login

strip spaces from user name as they will probably be ignored by ldap's search (rfc4518)
Fixes #2865
This commit is contained in:
Holger Brunn 2014-10-02 15:52:07 +02:00 committed by Martin Trigaux
parent e6ca891714
commit 4c6a998c29
1 changed files with 1 additions and 1 deletions

View File

@ -183,7 +183,7 @@ class CompanyLDAP(osv.osv):
"""
user_id = False
login = tools.ustr(login.lower())
login = tools.ustr(login.lower().strip())
cr.execute("SELECT id, active FROM res_users WHERE lower(login)=%s", (login,))
res = cr.fetchone()
if res: