From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: rack-devel@googlegroups.com
Subject: Re: Mongrel handler doesn't set env[REMOTE_ADDR] with the value of "X-Forwarded-For" header
Date: Mon, 14 Sep 2009 00:44:44 +0200 [thread overview]
Message-ID: <200909140044.44392.ibc@aliax.net> (raw)
In-Reply-To: <e1c05edd0909131514i308f4e4eu1a0d1d51ea149e64@mail.gmail.com>
El Lunes, 14 de Septiembre de 2009, Aman Gupta escribió:
> Overwriting env['REMOTE_ADDR'] with X-Forwarded-For is not a good
> idea, because the X-Forwarded-For header can be forged by the client.
True.
In case of a scenario with http proxy, the proxy must insert that header and
ensure to delete existing ones (probably spoofed by the client).
But if Thin runs alone (no proxy) and receives a spoofed request with "X-
Forwarded-For" then it will fail when logging SERVER_ADDR. And it can be a
security risk!
--
Iñaki Baz Castillo <ibc@aliax.net>
prev parent reply other threads:[~2009-09-13 22:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-13 15:52 Mongrel handler doesn't set env[REMOTE_ADDR] with the value of "X-Forwarded-For" header Iñaki Baz Castillo
2009-09-13 21:51 ` Michael Fellinger
2009-09-13 22:08 ` Iñaki Baz Castillo
2009-09-13 22:14 ` Aman Gupta
2009-09-13 22:44 ` Iñaki Baz Castillo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://groups.google.com/group/rack-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200909140044.44392.ibc@aliax.net \
--to=rack-devel@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).