Mercurial > kallithea
diff rhodecode/lib/auth.py @ 1425:3dedf3991d40 beta
fixes #173, many thanks for slestak for contributing into this one.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 10 Jul 2011 15:50:31 +0200 |
parents | e9fe4ff57cbb |
children | bf263968da47 04027bdb876c 6cab36e31f09 |
line wrap: on
line diff
--- a/rhodecode/lib/auth.py Sun Jul 10 13:15:23 2011 +0200 +++ b/rhodecode/lib/auth.py Sun Jul 10 15:50:31 2011 +0200 @@ -41,7 +41,7 @@ if __platform__ in PLATFORM_OTHERS: import bcrypt -from rhodecode.lib import str2bool +from rhodecode.lib import str2bool, safe_unicode from rhodecode.lib.exceptions import LdapPasswordError, LdapUsernameError from rhodecode.lib.utils import get_repo_slug from rhodecode.lib.auth_ldap import AuthLdap @@ -207,10 +207,10 @@ .get(k), [''])[0] user_attrs = { - 'name': get_ldap_attr('ldap_attr_firstname'), - 'lastname': get_ldap_attr('ldap_attr_lastname'), - 'email': get_ldap_attr('ldap_attr_email'), - } + 'name': safe_unicode(get_ldap_attr('ldap_attr_firstname')), + 'lastname': safe_unicode(get_ldap_attr('ldap_attr_lastname')), + 'email': get_ldap_attr('ldap_attr_email'), + } if user_model.create_ldap(username, password, user_dn, user_attrs):