LDAP authentication with special char in password doesn't work

Bug #1163688 reported by sulliwane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

When trying to connect to OpenERP (with LDAP module installed) it doesn't works if password contains special chars (at least é char). For every other "simple char password", no problems.

Here is the server error log :

OpenERP Server Error
Client Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/http.py", line 195, in dispatch
    response["result"] = method(self, **self.params)
  File "/opt/openerp/server/openerp/addons/web/controllers/main.py", line 817, in authenticate
    req.session.authenticate(db, login, password, env)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 116, in authenticate
    uid = self.proxy('common').authenticate(db, login, password, env)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 31, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/openerp/server/openerp/addons/web/session.py", line 104, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

Server Traceback (most recent call last):
  File "/opt/openerp/server/openerp/addons/web/session.py", line 90, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 293, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 433, in dispatch
    return fn(*params)
  File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 445, in exp_authenticate
    return res_users.authenticate(db, login, password, user_agent_env)
  File "/opt/openerp/server/openerp/addons/base/res/res_users.py", line 421, in authenticate
    uid = self.login(db, login, password)
  File "/opt/openerp/server/openerp/addons/auth_ldap/users_ldap.py", line 252, in login
    entry = ldap_obj.authenticate(conf, login, password)
  File "/opt/openerp/server/openerp/addons/auth_ldap/users_ldap.py", line 105, in authenticate
    conn.simple_bind_s(dn, password)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 206, in simple_bind_s
    msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 200, in simple_bind
    return self._ldap_call(self._l.simple_bind,who,cred,EncodeControlTuples(serverctrls),EncodeControlTuples(clientctrls))
  File "/usr/lib/python2.7/dist-packages/ldap/ldapobject.py", line 96, in _ldap_call
    result = func(*args,**kwargs)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128)

Tags: ldap
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.