Skip to content
Snippets Groups Projects
Commit 67848457 authored by Holger Brunn's avatar Holger Brunn Committed by Martin Trigaux
Browse files

[FIX] auth_ldap: encode python ldap's output as utf8


Non-ascii characters in LDAP don't cause a python unicode string in
returned ldap entries, this commit fixes this.

Before this commit, further string operations on ldap values with
non-ascii characters fail.

closes odoo/odoo#40761

Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent 715c136c
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,7 @@ class CompanyLDAP(models.Model):
"""
return {
'name': ldap_entry[1]['cn'][0],
'name': tools.ustr(ldap_entry[1]['cn'][0]),
'login': login,
'company_id': conf['company'][0]
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment