Bug #72764 [Com]: ftps:// opendir wrapper data channel encryption fails with IIS FTP 7.5, 8.5
| From: | vhu at iki dot fi | Date: | Fri, 05 Aug 2016 13:25:33 +0000 |
| Subject: | Bug #72764 [Com]: 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-202960@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
Comment by: vhu at iki dot fi
Reported by: vhu at iki dot fi
Summary: ftps:// opendir wrapper data channel encryption
fails with IIS FTP 7.5, 8.5
Status: Open
Type: Bug
Package: Streams related
Operating System: *
PHP Version: 5.6.25RC1
Block user comment: N
Private report: N
New Comment:
There is a PR#2058 for this: https://github.com/php/php-src/pull/2058
Previous Comments:
------------------------------------------------------------------------
[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