2689: Error logging in to ReviewBoard if not already logged in

Duan*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Nov. 18, 2012
Just recently upgraded to Review Board 1.6.11.

When logging in on a browser without an existing cookie, I get a 500 Internal Server Error in response.  However, on my machine that was previously logged in, I can use Review Board just fine.

What version are you running?

1.6.11

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

Main URL (/reviews/ on my server)

What steps will reproduce the problem?
1. Clear cookies on browser
2. Go to http://xxx.xxx.com/reviews/ (where I have the review board app mapped in my Apache server)
3. Observe "Something broke! (Error 500)

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

I expect to see the Review Board login page, which was previously visible using version 1.6.3 before doing the upgrade to 1.6.11.

What operating system are you using? What browser?

Tested in both Firefox (PC) and Chrome (Mac).  Server is using CentOS Linux Release 5.7.

Please provide any additional information below.

This is the information from reviewboard.log:

2012-07-31 15:43:17,400 - ERROR - Exception thrown for user AnonymousUser at http://xxx.xxx.com/reviews/

'tuple' object has no attribute 'scheme'
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Django-1.3.2-py2.4.egg/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.4/site-packages/Django-1.3.2-py2.4.egg/django/views/generic/simple.py", line 57, in redirect_to
    return klass(url % kwargs)
  File "/usr/lib/python2.4/site-packages/Django-1.3.2-py2.4.egg/django/http/__init__.py", line 645, in __init__
    if parsed.scheme and parsed.scheme not in self.allowed_schemes:
AttributeError: 'tuple' object has no attribute 'scheme'
2012-07-31 15:43:17,401 - ERROR - Internal Server Error: /reviews/
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Django-1.3.2-py2.4.egg/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.4/site-packages/Django-1.3.2-py2.4.egg/django/views/generic/simple.py", line 57, in redirect_to
    return klass(url % kwargs)
  File "/usr/lib/python2.4/site-packages/Django-1.3.2-py2.4.egg/django/http/__init__.py", line 645, in __init__
    if parsed.scheme and parsed.scheme not in self.allowed_schemes:
AttributeError: 'tuple' object has no attribute 'scheme'
chipx86
#1 chipx86
This looks to be the new code path in the Django security release. Why we're hitting it, I don't know... I suspect they didn't test in Python 2.4.

I would say for now, manually downgrade to Django 1.3.1. Unfortunately. You can do this with:

    $ sudo easy_install Django==1.3.1

And delete the Django-1.3.2-py2.4.egg directory referenced.
  • +Confirmed
chipx86
#2 chipx86
Filed a bug on the Django project: https://code.djangoproject.com/ticket/18692

For what it's worth, Review Board 1.7 won't be supporting Python 2.4, so it might not be a bad idea to think about upgrading Python.
#3 Duan*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Thanks for the quick reply! Downgrading to Django 1.3.1 does work for now, but I think I will try to upgrade to Python.  Should there be any issue upgrading to Python 2.7 or should I stick with Python 2.5?
chipx86
#4 chipx86
2.7 is a good, safe bet. Note that all your existing packages are part of your 2.4 setup, so you'll basically need to reinstall them all.
david
#5 david
Django ticket 18692 was fixed in https://github.com/django/django/commit/d0d5dc6cd76f01c8a71b677357ad2f702cb54416
  • -Confirmed
    +Fixed