Bug #72764 [Opn->Csd]: ftps:// opendir wrapper data channel encryption fails with IIS FTP 7.5, 8.5

From: Date: Fri, 05 Aug 2016 21:10:52 +0000
Subject: Bug #72764 [Opn->Csd]: ftps:// opendir wrapper data channel encryption fails with IIS FTP 7.5, 8.5
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202974@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72764&edit=1 ID: 72764 Updated by: nikic@php.net Reported by: vhu at iki dot fi Summary: ftps:// opendir wrapper data channel encryption fails with IIS FTP 7.5, 8.5 -Status: Open +Status: Closed Type: Bug Package: Streams related Operating System: * PHP Version: 5.6.25RC1 Block user comment: N Private report: N New Comment: Automatic comment on behalf of ville@fihells01.fi.dhl.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=65056e9d6c74adef89332080b5458fd4850fb3b7 Log: Fix #72764 Previous Comments: ------------------------------------------------------------------------ [2016-08-05 13:25:32] vhu at iki dot fi There is a PR#2058 for this: https://github.com/php/php-src/pull/2058 ------------------------------------------------------------------------ [2016-08-05 13:05:34] vhu at iki dot fi Description: ------------ Fix for bug #72667 changed the FTP/FTPS wrapper php_stream_ftp_opendir() so that the data channel is opened immediately after the PASV/EPSV command. If FTPS is enabled, data channel encryption is negotiated immediately after opening the data channel. IIS FTP server and ProFTPD only allow TLS negotiation after NLST command has been issued and data ready to be transmitted. As it is, FTPS opendir() and scandir() against IIS or ProFTPD effectively hang until the negotiation times out. Test script: --------------- <?php foreach (scandir('ftps://example.com/') as $fn) { print $fn ."\n"; } Expected result: ---------------- file1 file2 file3 Actual result: -------------- Warning: scandir(): SSL: Handshake timed out in test.php on line 2 Warning: scandir(ftps://example.com/): failed to open dir: Unable to activate SSL mode in test.php on line 2 Warning: scandir(): (errno 0): Success in test.php on line 2 Warning: Invalid argument supplied for foreach() in test.php on line 2 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72764&edit=1

« previous php.bugs (#202974) next »