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

From: Date: Fri, 05 Aug 2016 13:05:35 +0000
Subject: Bug #72764 [NEW]: ftps:// opendir wrapper data channel encryption fails with IIS FTP 7.5, 8.5
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202959@lists.php.net to get a copy of this message
From: vhu at iki dot fi Operating system: * PHP version: 5.6.25RC1 Package: Streams related Bug Type: Bug Bug description:ftps:// opendir wrapper data channel encryption fails with IIS FTP 7.5, 8.5 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 bug report at https://bugs.php.net/bug.php?id=72764&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72764&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72764&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72764&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72764&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72764&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72764&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72764&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72764&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72764&r=support Expected behavior: https://bugs.php.net/fix.php?id=72764&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72764&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72764&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72764&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72764&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72764&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72764&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72764&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72764&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72764&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72764&r=mysqlcfg

« previous php.bugs (#202959) next »