4521: Internal server error on /api/repositories after upgrade to 2.5.8

aboks
chipx86
chipx86

What version are you running?

2.5.8

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

/api/repositories/

What steps will reproduce the problem?

  1. Making an API GET request to /api/repositories, with an 'Authorization: token [redacted]' header.

What is the expected output? What do you see instead?

Expected to get a list of repositories (worked fine in 2.5.7). Got a mail about an internal server error in 2.5.8.

What operating system are you using? What browser?

ReviewBoard runs on Debian Wheezy. Browser is not relevant (custom API client).

Please provide any additional information below.

Stacktrace received in e-mail:

Traceback (most recent call last):

File "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
response = wrapped_callback(request, callback_args, *callback_kwargs)

File "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/views/decorators/cache.py", line 52, in _wrapped_view_func
response = view_func(request, args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/Django-1.6.11-py2.7.egg/django/views/decorators/vary.py", line 19, in inner_func
response = func(args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/Djblets-0.9.5-py2.7.egg/djblets/webapi/resources/base.py", line 135, in call
auth_result = check_login(request)

File "/usr/local/lib/python2.7/dist-packages/Djblets-0.9.5-py2.7.egg/djblets/webapi/auth/backends/init.py", line 87, in check_login
result = auth_backend_cls().authenticate(request)

File "/usr/local/lib/python2.7/dist-packages/Djblets-0.9.5-py2.7.egg/djblets/webapi/auth/backends/base.py", line 78, in authenticate
credentials = self.get_credentials(request)

File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.5.8-py2.7.egg/reviewboard/webapi/auth_backends.py", line 46, in get_credentials
.filter(username=credentials['username'])

TypeError: 'NoneType' object has no attribute 'getitem'

chipx86
#1 chipx86

Fixed on release-2.5.x (2ccc44c08b9a2dda2aa87301183b5212080c4b17).

Working on a release today.

  • -New
    +Fixed
  • +Release-2.5.x
  • -Priority:Medium
    +Component:API
    +Priority:High
  • +chipx86