Commit Graph

400 Commits

Author SHA1 Message Date
Nikita Popov
88ffe05797 Fix bug #77124
This is a backport of 6fcae63f61
to PHP 7.2.
2019-07-15 15:19:31 +02:00
Vlad Temian
ec2ecb7e12 Fix bug #77680: Correctly implement recursive mkdir on FTP stream
If the root directory was missing, an extra CWD without arguments was
made. Also, the MKD contained an empty string.

Now the CWD will use / and MKDs will be issued starting from the root
directory.
2019-03-25 17:43:46 +01:00
YanTao
3b09123de3 Fix FTPS passive mode of data channel event poll
Bugfix: when using passive mode of FTPS protocol, data channel events
should be polled when creating data connection channel, instead of polling
the event of ftp's self control channel, which may cause ftp transfer
problem while using ftps and passive mode.
2019-02-08 09:50:29 +01:00
Remi Collet
6ce4be1762 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  NEWS
  Fix #77151 ftp_close(): SSL_read on shutdown
2018-11-20 11:19:52 +01:00
Remi Collet
d9afc2f662 Fix #77151 ftp_close(): SSL_read on shutdown
Regression introduced in fix for #76972

only display the error message when sslerror
or if errno is set (for SSL_ERROR_SYSCALL case)
2018-11-20 11:18:34 +01:00
Peter Kokot
f1d7e3ca0b Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:31:31 +02:00
Peter Kokot
113213f027 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:29:24 +02:00
Peter Kokot
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +02:00
Peter Kokot
7af945e271 Trim trailing whitespace in *.phpt 2018-10-14 19:43:12 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Peter Kokot
7f6387b59a Trim trailing whitespace in source code files 2018-10-13 14:12:55 +02:00
Nikita Popov
fde2ae3721 Merge branch 'PHP-7.1' into PHP-7.2 2018-10-05 18:41:28 +02:00
Manuel Mausz
bb4a2e8bb7 Fix #76972: FTP data truncation due to forceful ssl socket shutdown
Do a correct bidirectional shutdown instead
2018-10-05 18:40:50 +02:00
Nikita Popov
fcf78dfb89 Merge branch 'PHP-7.1' into PHP-7.2 2018-09-04 04:55:15 +02:00
Ville Hukkamaki
742783c3ee Fixed bug #73457
Correctly report errors when opening FTP data connection.
2018-09-04 04:53:38 +02:00
atvoicu
17ed2f21cf Add missing skip prefix for some SKIPIF messages 2018-03-23 18:56:36 +01:00
Christoph M. Becker
c6cf3d4ada Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix some arginfos
2018-02-23 11:29:21 +01:00
Gabriel Caruso
0b8cfa6c78 Fix some arginfos
* all arguments for ftp_pasv are required
* $varname for getenv function isn't required anymore
* fsockopen and pfsockopen only require $hostname
* strtok can work with only one parameter
* strpbrk needs two parameters to work
* required parameters and add some parameters in openssl_* functions
2018-02-23 11:27:14 +01:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Andreas Treichel
29e4d4eee6 Add ftp_append to create a new file or append data to an existing file (RFC959) 2017-08-02 20:52:28 +02:00
chance garcia
510230d3dc Test ftp_ssl_connect() function : error conditions
test timeout warning
ensure connection fails with invalid hostname
test invalid parameter types
test exceeds expected number of parameters
2017-06-19 19:48:52 -04:00
Andreas Treichel
5b1300b6c9 ftp_mlsd(): Parse the MLSD response 2017-02-17 21:31:18 +01:00
Nikita Popov
267ab47366 Merge branch 'PHP-7.1' 2017-02-16 12:47:26 +01:00
Nikita Popov
f741f9b656 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-16 12:47:12 +01:00
Mitch Hagstrand
3b91ed112f Make the ftp and stream tests more reliable.
The tests can sometimes fail because it chooses a passive port for ftp that
is already in use. This makes the test attempt multiple times to find a free
port.
2017-02-16 12:46:55 +01:00
Andreas Treichel
0103d1e3bc
FTP: implement MLSD for structured listing of directories, decribed at https://tools.ietf.org/html/rfc3659 2017-01-29 07:28:22 +00:00
Joe Watkins
04db4ad4e3
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix FTP tests for Travis CI.
2017-01-09 00:37:24 +00:00
Joe Watkins
3b8dc330bf
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix FTP tests for Travis CI.
2017-01-09 00:36:57 +00:00
Mitch Hagstrand
47007455dc
Fix FTP tests for Travis CI.
This suppresses the errors from stream_socket_server() until
server.inc will not make anymore attempts.
2017-01-09 00:36:39 +00:00
Anatol Belski
97ac819c2b Merge branch 'PHP-7.1'
* PHP-7.1:
  move various places to the centralized OpenSSL setup routine
  use the new API for opaque symbol in OpenSSL 1.1.x
  implement basic config support for OpenSSL 1.1.x
2017-01-08 00:39:53 +01:00
Anatol Belski
43b92ed5a8 move various places to the centralized OpenSSL setup routine 2017-01-08 00:25:47 +01:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Nikita Popov
d18741d002 Fix ext/ftp 2016-11-22 19:06:59 +01:00
Kalle Sommer Nielsen
3ed0af3252 Kill some more strlen() calls and fix a possible missing NULL pointer check
Thanks to Anatol for review
2016-11-20 23:36:19 +01:00
Kalle Sommer Nielsen
53ca6fdaa4 Remove undefined variable if ext/ftp was built with SSL 2016-11-20 19:37:24 +01:00
Kalle Sommer Nielsen
d489569725 Fix typo 2016-11-20 19:36:48 +01:00
Kalle Sommer Nielsen
06767ffcbe Shave off a strlen() call in ftp_mkdir() 2016-11-20 19:36:36 +01:00
Anatol Belski
9593663d22 restore erroneously removed part 2016-11-13 00:04:10 +01:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Nikita Popov
c361020f04 Merge branch 'PHP-7.0' into PHP-7.1 2016-08-30 13:45:49 +02:00
Nikita Popov
2c12a5f0a8 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-30 13:44:59 +02:00
Ville Hukkamäki
af7828a20f Test case for bug #72771 2016-08-30 13:44:34 +02:00
Nikita Popov
6ab9b531bc Merge branch 'PHP-7.0' into PHP-7.1 2016-08-13 21:42:51 +02:00
Nikita Popov
98787d9002 Merge branch 'PHP-5.6' into PHP-7.0 2016-08-13 21:41:00 +02:00
Benedict Singer
dfadc5a427 Bug 70195
Many FTP-S servers now require FTP clients to re-use the SSL session
from the control connection on the data connection, to prove that the
same entity controls both connections. This patch updates PHP's FTP-S
client code to allow that possibility.
2016-08-13 21:35:03 +02:00
Nikita Popov
be31515cc6 Merge branch 'PHP-7.0' into PHP-7.1 2016-08-05 23:10:12 +02:00
Nikita Popov
a2a2ea18fe Merge branch 'PHP-5.6' into PHP-7.0
Conflicts:
	ext/standard/ftp_fopen_wrapper.c
2016-08-05 23:09:30 +02:00