Bug 537784 - Use X-Forwarded-For instead of REMOTE_ADDR for trusted proxies
Summary: Use X-Forwarded-For instead of REMOTE_ADDR for trusted proxies
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 3.4
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Noura El hawary
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 509100
TreeView+ depends on / blocked
 
Reported: 2009-11-16 11:00 UTC by Noura El hawary
Modified: 2013-06-24 04:05 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-11-17 09:31:05 UTC
Embargoed:


Attachments (Terms of Use)
v1 patch to use X-forwarded-for instead of remote_addr for trusted proxies (5.96 KB, patch)
2009-11-16 13:25 UTC, Noura El hawary
dkl: review+
Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Mozilla Foundation 527586 0 None None None Never

Description Noura El hawary 2009-11-16 11:00:06 UTC
It's a somewhat-common situation that people have their Bugzilla behind some
sort of proxy that does something (caching, SSL, etc.) with incoming traffic.
Unfortunately, this breaks $ENV{REMOTE_ADDR}, because all traffic seems to be
coming from the proxy.

We need a parameter (for the Advanced section) that allows admins to specify
the IP of their proxy, and then if traffic comes from that proxy, we trust the
X-Forwarded-For header instead of the REMOTE_ADDR.



dkl' comment on redhat bugzilla:
We currently have a hack in
Bugzilla.pm in init_page() that does similar that will need to be removed as
well since we will now use the upstream method.

Comment 1 Noura El hawary 2009-11-16 13:25:00 UTC
Created attachment 369693 [details]
v1 patch to use X-forwarded-for instead of remote_addr for trusted proxies

Hey Dave,

I have applied the upstream patch to our 3.4 branch, removed our similar code from Bugzilla.pm init_page, also for the new parameter 'inbound_proxies' included in the upstream patch in the new advanced parameter page, I have added it to our required_settings parameters page, as the upstream patch for the new advanced parameter page is still under review and marked for 3.6 release. I applied the patch to bz-web1 but couldn't test it there as bz-web1 is not working at the moment, but tested it in my localhost bugzilla along with the brute password patch and seems to be working good.

Thanks,
Noura

Comment 2 David Lawrence 2009-11-16 20:20:26 UTC
Comment on attachment 369693 [details]
v1 patch to use X-forwarded-for instead of remote_addr for trusted proxies

I already reviewed this upstream as well for Max so I am review+ here now as well.

Comment 3 Noura El hawary 2009-11-17 09:31:05 UTC
Thanks Dave, patch committed

Noura


Note You need to log in before you can comment on or make changes to this bug.