2279: 1.6.1 started to return redirected url instead of configured server name

kofe****@gmai***** (Google Code) (Is this you? Claim this profile.)
chipx86
chipx86
Oct. 8, 2011
What version are you running?
1.6.1

What's the URL of the page containing the problem?
login/ update diff

What steps will reproduce the problem?
1. upload diff
2.
3.

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


What operating system are you using? What browser?


Please provide any additional information below.
We run reviewboard on another host than official end point.
Let say our official name is rb.outr.site and reviewboard runs on
rb-inter.our.site:8001. With review board < 1.6.1 all generated urls
refere to rb.outr.site. Since upgrade to 1.6.1 links generated by
reviewboard refere to rb-inter.our.site:8001 even in json api.
chipx86
#1 chipx86
It's possible something may have changed in Django to cause this, but the first thing I'd check is the Admin UI -> Settings page. See what the server name is set to there. That should be the basis for all URLs.
  • +NeedInfo
  • -Type-Defect
    +Type-Support
    +Milestone-Release1.6.x
  • +chipx86
#2 kofe****@gmai***** (Google Code) (Is this you? Claim this profile.)
Yes, the issue probably comes from django ( at list I don't see any dramatic changes between 1.6 and 1.6.1). The Admin->Settins show the expected name rb.our.site.
chipx86
#3 chipx86
Looks like this was part of the set of fixes in Django 1.3.1 for the security vulnerabilities. See the info at:

https://www.djangoproject.com/weblog/2011/sep/09/security-releases-issued/

You should be able to set USE_X_FORWARDED_HOST = True in your site's conf/settings_local.py file to get around this.

Let me know if that works.
#4 kofe****@gmai***** (Google Code) (Is this you? Claim this profile.)
Thanks. As we reverted back to 1.6 I will do a second attempt to upgrade tomorrow.
david
#5 david
Did it work?
#6 kofe****@gmai***** (Google Code) (Is this you? Claim this profile.)
my apologies for late reply.

Yes, with USE_X_FORWARDED_HOST == True it works as expected.

Thanks.
chipx86
#7 chipx86
Added this to the FAQ. It'll appear in tonight's build.
  • -NeedInfo
    +Fixed
  • +Component-Docs