diff options
| author | Ville Hukkamaki <ville@fihells01.fi.dhl.com> | 2016-08-05 16:09:13 +0300 |
|---|---|---|
| committer | Nikita Popov <nikic@php.net> | 2016-08-05 22:56:54 +0200 |
| commit | 65056e9d6c74adef89332080b5458fd4850fb3b7 (patch) | |
| tree | 33ddf7bb44cb44a75f94e870c85ad82fc16146ca /ext/ftp/tests/server.inc | |
| parent | a8515a339d227ace5d5bad40b2a6e6cbe096d894 (diff) | |
| download | php-git-65056e9d6c74adef89332080b5458fd4850fb3b7.tar.gz | |
Fix #72764
Negotiate data channel encryption after NLST command.
This is to prevent issues with IIS and ProFTPD.
Diffstat (limited to 'ext/ftp/tests/server.inc')
| -rw-r--r-- | ext/ftp/tests/server.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/ftp/tests/server.inc b/ext/ftp/tests/server.inc index e2a74029bf..5629c2e312 100644 --- a/ext/ftp/tests/server.inc +++ b/ext/ftp/tests/server.inc @@ -288,6 +288,10 @@ if ($pid) { } + if ((!empty($ssl)) && (!stream_socket_enable_crypto($pasvs, true, STREAM_CRYPTO_METHOD_SSLv23_SERVER))) { + die("SSLv23 handshake failed.\n"); + } + if (empty($m[1]) || $m[1] !== 'emptydir') { fputs($fs, "file1\r\nfile1\r\nfile\nb0rk\r\n"); } @@ -403,10 +407,6 @@ if ($pid) { $pasvs = stream_socket_accept($soc,10); - if ((!empty($ssl)) && (!stream_socket_enable_crypto($pasvs, true, STREAM_CRYPTO_METHOD_SSLv23_SERVER))) { - die("SSLv23 handshake failed.\n"); - } - }elseif (preg_match('/^EPSV/', $buf, $matches)) { fputs($s, "550 Extended passsive mode not supported.\r\n"); } elseif (preg_match('/^SITE EXEC/', $buf, $matches)) { |
