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

New issue 3256 by walt.jav...@gmail.com: unable to log in (http 500) when using ldap auth backend + unicode password
http://code.google.com/p/reviewboard/issues/detail?id=3256

What version are you running?

RB 1.7.21



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

https://reviewboard/account/login



What steps will reproduce the problem?

1. Configure Review Board with an Active Directory authentication backend
   (https://reviewboard/admin/settings/authentication/)

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
   password.

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 usern...@ad.mycorp.com is trying to log in via AD 2014-01-30 15:02:12,209 - ERROR - - Exception thrown for user AnonymousUser at https://reviewboard.mycorp.com/account/login/

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/base.py", 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/debug.py", 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/decorators.py", 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/cache.py", 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/views.py", line 36, in login
    if form.is_valid():
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/forms/forms.py", 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/forms.py", line 115, in _get_errors
    self.full_clean()
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/forms/forms.py", line 271, in full_clean
    self._clean_form()
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/forms/forms.py", 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/forms.py", line 167, in clean
    password=password)
File "/usr/lib/python2.6/site-packages/Django-1.4.10-py2.6.egg/django/contrib/auth/__init__.py", line 45, in authenticate
    user = backend.authenticate(**credentials)
File "/usr/lib/python2.6/site-packages/ReviewBoard-1.7.21-py2.6.egg/reviewboard/accounts/backends.py", line 539, in authenticate
    con.simple_bind_s(bind_username, password)
File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 206, in simple_bind_s
    msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
File "/usr/lib64/python2.6/site-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/lib64/python2.6/site-packages/ldap/ldapobject.py", 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:
https://code.google.com/hosting/settings

--
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 reviewboard-issues+unsubscr...@googlegroups.com.
To post to this group, send email to reviewboard-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to