Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDAP login failure with special characters in name #4039

Closed
lasalesi opened this issue Sep 4, 2017 · 3 comments
Closed

LDAP login failure with special characters in name #4039

lasalesi opened this issue Sep 4, 2017 · 3 comments
Assignees

Comments

@lasalesi
Copy link
Contributor

lasalesi commented Sep 4, 2017

Expected Behaviour

Login with LDAP works when using a full name with special character such as ä, ö, ü

Actual Behaviour

Login fails with error message

 Traceback (most recent call last):
   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 56, in application
     response = frappe.handler.handle()
   File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
     data = execute_cmd(cmd)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 52, in execute_cmd
     return frappe.call(method, **frappe.form_dict)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 922, in call
     return fn(*args, **newargs)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings /ldap_settings.py", line 50, in login
     user = authenticate_ldap_user(frappe.as_unicode(args.usr), frappe.as_unicode(args.pwd))
   File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings /ldap_settings.py", line 94, in authenticate_ldap_user
     conn.simple_bind_s(dn, frappe.as_unicode(password))
   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/ldap/ldapobject.py", line 228,  in simple_bind_s
     msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/ldap/ldapobject.py", line 222,       in simple_bind
     return  self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/ldap/ldapobject.py", line 108,  in _ldap_call
     result = func(*args,**kwargs)
 UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 9: ordinal not in range(128)
   frappe-web.min.js:1373:21
 Traceback (most recent call last):
   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 56, in application
     response = frappe.handler.handle()
   File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
     data = execute_cmd(cmd)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 52, in execute_cmd
     return frappe.call(method, **frappe.form_dict)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 922, in call
     return fn(*args, **newargs)
   File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings /ldap_settings.py", line 50, in login
     user = authenticate_ldap_user(frappe.as_unicode(args.usr), frappe.as_unicode(args.pwd))
   File "/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/ldap_settings  /ldap_settings.py", line 94, in authenticate_ldap_user
     conn.simple_bind_s(dn, frappe.as_unicode(password))
   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/ldap/ldapobject.py", line 228, in simple_bind_s
     msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/ldap/ldapobject.py", line 222,  in simple_bind
     return  self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/ldap/ldapobject.py", line 108,   in _ldap_call
     result = func(*args,**kwargs)
 UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 9: ordinal not in range(128)

Steps to reproduce:

  1. Set up ERPNext with LDAP integration
  2. Create a user in the LDAP directory with user name "hans.mueller", full name "Hans Müller" and some PW
  3. Try to log in with the above credentials "hans.mueller" and PW

Frappé version:

8.9.2 (master)

@aleksas
Copy link
Contributor

aleksas commented Jan 16, 2018

Likely to be the same as https://discuss.erpnext.com/t/ldap-login-ordinal-not-in-range-128/32593
Also Error Snapshot contains non-hidden password.

ERPNext: v10.0.9 (master)
Frappe Framework: v10.0.10 (master)

@aleksas
Copy link
Contributor

aleksas commented Feb 5, 2018

Bounty added: LINK

@gavindsouza
Copy link
Collaborator

fixed in an early release

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants