You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@allura.apache.org by Dave Brondsema <da...@brondsema.net> on 2014/11/13 00:30:24 UTC

[allura:tickets] #7787 Ldap error when logging in with unicode in username or password

- **summary**: Ldap error when logging in with unicode in username field --> Ldap error when logging in with unicode in username or password
- Description has changed:

Diff:

~~~~

--- old
+++ new
@@ -1,4 +1,8 @@
+The following error occurs with unicode in username or in password fields.
+
 Since most LDAP systems aren't going to allow unicode usernames, I think its best to catch this situation ahead of time and provide a relevant error message, so the user can fix their input.  Note that the unicode char may even be a hidden left-to-right marker for example, so an explicit message about unicode or non-ascii may be helpful.
+
+For password, we should handle it.  (The password change form lets you change it to unicode successfully)
 
 ~~~~
 File '/home/dbrondsema/dbrondsema-1019/forge/Allura/allura/lib/plugin.py', line 578 in _validate_password

~~~~




---

** [tickets:#7787] Ldap error when logging in with unicode in username or password**

**Status:** open
**Milestone:** unreleased
**Created:** Thu Oct 30, 2014 07:54 PM UTC by Dave Brondsema
**Last Updated:** Wed Nov 12, 2014 06:30 PM UTC
**Owner:** nobody

The following error occurs with unicode in username or in password fields.

Since most LDAP systems aren't going to allow unicode usernames, I think its best to catch this situation ahead of time and provide a relevant error message, so the user can fix their input.  Note that the unicode char may even be a hidden left-to-right marker for example, so an explicit message about unicode or non-ascii may be helpful.

For password, we should handle it.  (The password change form lets you change it to unicode successfully)

~~~~
File '/home/dbrondsema/dbrondsema-1019/forge/Allura/allura/lib/plugin.py', line 578 in _validate_password
  con = ldap_conn(ldap_user, password)
File '/home/dbrondsema/dbrondsema-1019/forge/Allura/allura/lib/plugin.py', line 427 in ldap_conn
  cred or config['auth.ldap.admin_password'])
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 117 in wrapper
  return self.run_and_log(func, inst, *args, **kwargs)
File '/var/local/env-allura/lib/python2.7/site-packages/TimerMiddleware-0.4.4-py2.7.egg/timermiddleware/__init__.py', line 126 in run_and_log
  return func(*args, **kwargs)
File '/var/local/env-allura/lib/python2.7/site-packages/python_ldap-2.4.14-py2.7-linux-x86_64.egg/ldap/ldapobject.py', line 222 in bind_s
  msgid = self.bind(who,cred,method)
File '/var/local/env-allura/lib/python2.7/site-packages/python_ldap-2.4.14-py2.7-linux-x86_64.egg/ldap/ldapobject.py', line 216 in bind
  return self.simple_bind(who,cred)
File '/var/local/env-allura/lib/python2.7/site-packages/python_ldap-2.4.14-py2.7-linux-x86_64.egg/ldap/ldapobject.py', line 201 in simple_bind
  return self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
File '/var/local/env-allura/lib/python2.7/site-packages/python_ldap-2.4.14-py2.7-linux-x86_64.egg/ldap/ldapobject.py', line 99 in _ldap_call
  result = func(*args,**kwargs)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 4-6: ordinal not in range(128)
~~~~


---

Sent from forge-allura.apache.org because dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.