MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001500XdebugRemote Debuggingpublic2017-12-06 18:562017-12-07 12:13
Reporterchadxz 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionduplicate 
PlatformLinuxOSUbuntuOS Version16.04
Product Version2.5.5 
Target VersionFixed in Version 
Summary0001500: remote_connect_back fails to connect when HTTP_X_FORWARDED_FOR contains comma-delimited ip addresses
Descriptionremote_connect_back fails to connect when HTTP_X_FORWARDED_FOR contains comma-delimited ip addresses. This usually happens when the application is behind multiple proxies. In my case, the application is behind an HAProxy and an NGINX.

I would expect that it would pull the first ip address out of the list, as usually this is the one that represents the client's ip address (see https://en.wikipedia.org/wiki/X-Forwarded-For#Format [^])
Steps To Reproduce1. Setup a php application with two levels of proxies, i.e. HAProxy -> NGINX -> apache php application
2. configure xdebug for remote debugging with connect back: remote_enable=1 remote_connect_back=1
3. visit php application with ?XDEBUG_SESSION_START=foo

see in the logs that it failed.
Additional InformationRelevant log output:

Log opened at 2017-12-06 18:43:51
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Remote address found, connecting to 10.24.3.223, 10.24.55.84:9000.
W: Creating socket for '10.24.3.223, 10.24.55.84:9000', getaddrinfo: Not a directory.
E: Could not connect to client. :-(
Log closed at 2017-12-06 18:43:51
TagsNo tags attached.
Operating System
PHP Version7.1.5-7.1.9
Attached Files

- Relationships
duplicate of 0000964closedderick Xdebug does not parse X-Forwarded-For 

-  Notes
(0004503)
derick (administrator)
2017-12-07 10:51

This is a duplicate of https://bugs.xdebug.org/bug_view_page.php?bug_id=00000964, [^] which got fixed and release as part of 2.6.0alpha1: https://xdebug.org/updates.php#x_2_6_0alpha1 [^]
(0004504)
chadxz (reporter)
2017-12-07 12:13

Thanks, searched but didn't see it!

- Issue History
Date Modified Username Field Change
2017-12-06 18:56 chadxz New Issue
2017-12-07 10:51 derick Note Added: 0004503
2017-12-07 10:51 derick Relationship added duplicate of 0000964
2017-12-07 10:51 derick Status new => resolved
2017-12-07 10:51 derick Resolution open => duplicate
2017-12-07 10:51 derick Assigned To => derick
2017-12-07 12:13 chadxz Note Added: 0004504


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker