Req #55651 [Com]: Option to force PHP to ignore the PASV address returned

From: Date: Fri, 04 Dec 2015 10:43:27 +0000
Subject: Req #55651 [Com]: Option to force PHP to ignore the PASV address returned
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197586@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55651&edit=1 ID: 55651 Comment by: lucas dot bedout at free dot fr Reported by: abrender at elitehosts dot com Summary: Option to force PHP to ignore the PASV address returned Status: Open Type: Feature/Change Request Package: FTP related Operating System: All PHP Version: 5.3.8 Block user comment: N Private report: N New Comment: Is the patch for 5.3.8 working on > 5.6 ? Previous Comments: ------------------------------------------------------------------------ [2015-09-03 13:41:38] oskar dot danielsson at hotmail dot com It has been almost exactly four years since this bug report was created, but the bug persists in version 5.6.10. It has 165 votes with a 100% rate of reproduction. Why isn't this being reviewed? ------------------------------------------------------------------------ [2013-08-24 23:24:24] abrender at elitehosts dot com Hi, Any chance of this patch getting reviewed and accepted? (A more detailed explanation is at http://www.elitehosts.com/blog/php-ftp-passive-ftp-server- behind-nat- nightmare/) There were 78 votes, 72 people reproduced the problem and other people are seeing the same problem: http://blog.derakkilgo.com/2013/08/24/php-has-a-ftps-bug-please-vote-this-bug- up-so-someone-will-approve-this-patch/ https://bugs.php.net/bug.php?id=64600 http://www.codingforums.com/archive/index.php/t-285742.html http://www.techques.com/question/1-2851547/How-to-Send-File-over-secure-FTP-SSL- Protocol http://www.webdeveloper.com/forum/showthread.php?236275-ftp_connect-blocked Thanks! ------------------------------------------------------------------------ [2011-09-10 15:57:03] abrender at elitehosts dot com PS - this patch works against PHP 5.2.17 as well as 5.3.8 ------------------------------------------------------------------------ [2011-09-09 08:09:49] abrender at elitehosts dot com Description: ------------ In response to the PASV command, FTP servers sometimes return their IP address (10.X for example) and PHP honors this IP address, stores it in ftp->pasvaddr and uses that for future connections. This is problematic because PHP won't be able to communicate with a server behind a NAT device using passive FTP. The attached patch adds the USEPASVADDRESS option (a boolean) which can be set and read via the ftp_set_option() and ftp_get_option() functions. USEPASVADDRESS is set to TRUE by default to preserve existing functionality. When USEPASVADDRESS is set to FALSE, the ftp extension will ignore the IP address returned by the PASV command and instead use the IP address passed to ftp_connect() (or ftp_ssl_connect()) In the future we may expand the values to include AUTO which would ignore any RFC 1918 IP addresses returned by the PASV command. The only thing to note is that the call to ftp_set_option() must be made before ftp_pasv() is called. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55651&edit=1

« previous php.bugs (#197586) next »