MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000964XdebugRemote Debuggingpublic2013-07-16 20:072017-12-02 16:19
Reportermslade 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSBU LinuxOS Version5.0
Product Version2.2.2 
Target VersionFixed in Version2.6.0alpha1 
Summary0000964: Xdebug does not parse X-Forwarded-For
DescriptionXdebug uses the X-Forwarded-For header for remote_connect_back but it doesn't parse the header value. It assumes it to be a single IP, so when multiple IPs are included here it results in a malformed hostname. Here is an example from my log file:

I: Remote address found, connecting to 168.122.67.172, 168.122.67.172:9000.
Steps To Reproduce - Configure Xdebug with xdebug.remote_connect_back = 1 and xdebug.remote_log writing somewhere you can reach.
 - Issue a request such as curl -H 'X-Forwarded-For: 127.0.0.1, 127.0.0.2' --cookie 'XDEBUG_SESSION=test-case' http://localhost [^]
 - Look at the Xdebug remote log file and note a line such as:

I: Remote address found, connecting to 127.0.0.1, 127.0.0.2:9000.
Additional Informationhttps://en.wikipedia.org/wiki/X-Forwarded-For#Format [^]

Note that I tested this against 2.2.2, but it appears to be the same in 2.2.3.
TagsNo tags attached.
Operating System
PHP Version5.4.0
Attached Files

- Relationships
has duplicate 0001500resolvedderick remote_connect_back fails to connect when HTTP_X_FORWARDED_FOR contains comma-delimited ip addresses 

-  Notes
(0002543)
derick (administrator)
2013-07-23 11:52

Which one should I use then? The first one to do the callback?
(0002545)
mslade (reporter)
2013-07-23 17:51

That would be the behavior I expected. The first IP will be the client's actual IP address at the end of the proxy chain.
(0004155)
derick (administrator)
2017-01-04 11:20

Fixed, through a patch by Steve Easley.

- Issue History
Date Modified Username Field Change
2013-07-16 20:07 mslade New Issue
2013-07-23 11:52 derick Note Added: 0002543
2013-07-23 11:52 derick Assigned To => derick
2013-07-23 11:52 derick Status new => feedback
2013-07-23 17:51 mslade Note Added: 0002545
2013-07-23 17:51 mslade Status feedback => assigned
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2016-11-28 20:18 derick Status assigned => acknowledged
2016-11-28 20:18 derick Category Usage problems (Wrong Results) => Remote Debugging
2016-12-04 17:10 derick Status acknowledged => confirmed
2017-01-04 11:20 derick Note Added: 0004155
2017-01-04 11:20 derick Status confirmed => closed
2017-01-04 11:20 derick Resolution open => fixed
2017-01-04 11:20 derick Fixed in Version => 2.6.0dev
2017-12-02 16:19 derick Fixed in Version 2.6.0dev => 2.6.0alpha1
2017-12-07 10:51 derick Relationship added has duplicate 0001500


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker