[FIX] auth_ldap: fix authentication with special chars
encode the filter in utf-8 This prevents a UnicodeDecode error in python-ldap when the filter contains non ascii characters. opw-682783 closes #10899 closes #12710
This commit is contained in:
parent
4ab34d4156
commit
94f58d647c
|
@ -102,7 +102,7 @@ class CompanyLDAP(osv.osv):
|
|||
_logger.warning('Could not format LDAP filter. Your filter should contain one \'%s\'.')
|
||||
return False
|
||||
try:
|
||||
results = self.query(conf, filter)
|
||||
results = self.query(conf, filter.encode('utf-8'))
|
||||
|
||||
# Get rid of (None, attrs) for searchResultReference replies
|
||||
results = [i for i in results if i[0]]
|
||||
|
|
Loading…
Reference in New Issue