6.0.0-alpha12
6/8/25

[#1230] header.txt - Unable to substitute HTTP_X_FORWARDED_FOR
Summary header.txt - Unable to substitute HTTP_X_FORWARDED_FOR
Queue IMP
Queue Version 4.0.1
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester imp (at) mavetju (dot) org
Created 01/24/2005 (7440 days ago)
Due
Updated 01/24/2005 (7440 days ago)
Assigned 01/24/2005 (7440 days ago)
Resolved 01/24/2005 (7440 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/24/2005 11:23:26 AM Jan Schneider State ⇒ Not A Bug
 
01/24/2005 11:14:15 AM imp (at) mavetju (dot) org Comment #4 Reply to this comment
Final verdict:



Because the proxy doesn't do anything with the data, except for 
forwarding it (SSL connection, it can't modify the data), it is up to 
the client to send the IP address.



And the clients don't send it. Lousy clients :-)




01/24/2005 11:08:55 AM imp (at) mavetju (dot) org Comment #3 Reply to this comment
This seems to be a squid-proxy HTTPS vs HTTP issue, not a Horde issue.



Compare the output (if you're using Squid with forwarded_for set to on):

    http://www.copyright.org.au/~edwin/c.php

vs

    https://www.copyright.org.au/~edwin/c.php



Please close this one, I'll ask the Squid people.



Thanks for letting me know how the text filter works, Edwin
01/24/2005 10:14:18 AM Jan Schneider Comment #2
Summary ⇒ header.txt - Unable to substitute HTTP_X_FORWARDED_FOR
State ⇒ Feedback
Reply to this comment
If it doesn't get substituted, the values can't be retrieved through 
PHP's getenv() function. The replacement happens in 
lib/Horde/Text/Filter/environment.php.
01/24/2005 01:34:33 AM imp (at) mavetju (dot) org Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ header.txt - Unable to substiture HTTP_X_FORWARDED_FOR
Queue ⇒ IMP
Reply to this comment
In the ever lasting quest of helping users, I have added the following 
four headers to imp/config/header.txt:



X-Originating-IP: %REMOTE_ADDR%

X-Originating-Hostname: %REMOTE_HOST%

X-Proxied-for-IP: %HTTP_X_FORWARDED_FOR%

X-Proxied-via: %HTTP_VIA%



The first two are replaced properly, the second two aren't:

X-Originating-IP: 202.83.176.9

X-Originating-Hostname: proxy.barnet.com.au

X-Proxied-for-IP:

X-Proxied-via:



The four variables are listed in the PHP phpinfo() output under Apache 
Environment.



I tried to figure out how the replacement of variables works, but I 
wasn't able to make sense of it. That's more a problem from my side 
than from your side :-)


Saved Queries