Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3256 by unable to log in (http 500) when using ldap auth backend + unicode password

What version are you running?

RB 1.7.21

What's the URL of the page containing the problem?


What steps will reproduce the problem?

1. Configure Review Board with an Active Directory authentication backend

2. In Active Directory (not the RB Active Directory settings, but in the
   actual AD info), set up an account with a password that contains a
   non-ascii unicode character.

3. Attempt to login to Review Board with the AD account that has a unicode

I will work to see if I can find a more precise and concise repo.

What is the expected output?

I would expect to log in to Review Board successfully.

What do you see instead?

The client sees "500 Server Error".

When I check in the server-side Review Board logs I see the following traceback:

2014-01-30 15:02:12,208 - DEBUG - - User is trying to log in via AD 2014-01-30 15:02:12,209 - ERROR - - Exception thrown for user AnonymousUser at

UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 8: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/core/handlers/", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/views/decorators/", line 75, in sensitive_post_parameters_wrapper
    return view(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/utils/", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/views/decorators/", line 89, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/contrib/auth/", line 36, in login
    if form.is_valid():
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/forms/", line 124, in is_valid
    return self.is_bound and not bool(self.errors)
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/forms/", line 115, in _get_errors
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/forms/", line 271, in full_clean
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/forms/", line 299, in _clean_form
    self.cleaned_data = self.clean()
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/contrib/auth/", line 167, in clean
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/contrib/auth/", line 45, in authenticate
    user = backend.authenticate(**credentials)
File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.21-py2.6.egg/reviewboard/accounts/", line 539, in authenticate
    con.simple_bind_s(bind_username, password)
File "/usr/lib64/python2.6/site-packages/ldap/", line 206, in simple_bind_s
    msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
File "/usr/lib64/python2.6/site-packages/ldap/", line 200, in simple_bind return self._ldap_call(self._l.simple_bind,who,cred,EncodeControlTuples(serverctrls),EncodeControlTuples(clientctrls)) File "/usr/lib64/python2.6/site-packages/ldap/", line 96, in _ldap_call
    result = func(*args,**kwargs)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 8: ordinal not in range(128)

What operating system are you using? What browser?

The RB server is running on CentOS 6.2 behind apache with mod wsgi.

The client is:

Chromium 30.0.1599.114 Ubuntu 12.04 (30.0.1599.114-0ubuntu0.12.04.3)
I've been able to repro this issue with other browsers as well though, and believe this isn't related to the client.

Please provide any additional information below.

I have not yet tried having a unicode character in the AD username. Only the password.

You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to