Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replace header "X-Forwarded-For" to standard header "Forwarded" #254

Closed
virgil opened this issue Aug 25, 2015 · 2 comments
Closed

Replace header "X-Forwarded-For" to standard header "Forwarded" #254

virgil opened this issue Aug 25, 2015 · 2 comments

Comments

@virgil
Copy link
Contributor

virgil commented Aug 25, 2015

See: https://en.wikipedia.org/wiki/X-Forwarded-For#.22Forwarded.22_Header

@evilaliv3
Copy link
Contributor

@virgil i do not think it will be a good idea to REPLACE, but we will simply "EVALUATE BOTH".

let me clarify why and how we are using the x-forwarded-for as it is used in various ways and for varios reasons:

  1. tor2web makes use of the x-forwarded-for to recognize the user ip and detect if the user is coming from Tor
  2. tor2web deletes the x-forwarded-for header from the request in order to remove the ip of the admin; to be keep in mind that this can break some apps but it's important for us to try to protect the privacy of the user.

in relation to both 1) and 2) we should evaluate the implementation of the new "Forward" header checks and eventually decide the priority order for 1) among the de facto standard and the new standard.

i'm wondering if in relation to the privacy concern (point 2) we should always stript the ip removal by at least replacing always the ip address that we recognize for the user with "" in every header/upstream content; what do you think @fpietrosanti / @vecna / @hellais in relation to the globaleaks project?

@virgil
Copy link
Contributor Author

virgil commented Jul 3, 2016

Obviously don't include the for=; it's an optional parameter. Just use the "proto" and "host"

And voila. A standards as well as privacy compliant version of X-forwarded-for

virgil added a commit to virgil/Tor2web that referenced this issue Jul 9, 2016
tor2web#254

Replacing `X-forwarded-for` and `X-forwarded-port` with `Forwarded`.
@virgil virgil closed this as completed Jul 9, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants