Commit Graph

287 Commits

Author SHA1 Message Date
Dmitry Stogov
6c810b0d4c Improved memory usage by movig constants to read only memory. (Dmitry, Pierre) 2007-09-27 18:00:48 +00:00
Antony Dovgal
d042fd0675 MFH: php_gmtime_r() fixes 2007-06-07 08:59:00 +00:00
Antony Dovgal
1f65545121 fix test names 2007-05-07 18:03:01 +00:00
Ilia Alshanetsky
bc1f7356d7 Fixed CRLF injection inside ftp_putcmd().
# Reported on BugTraq by loveshell[at]Bug.Center.Team
2007-03-24 16:25:42 +00:00
Martin Kraemer
9c62ddde34 Typo 2007-03-14 09:58:14 +00:00
Ilia Alshanetsky
efad70c2cc snprintf() -> slprintf() 2007-02-27 03:28:17 +00:00
Stanislav Malyshev
33956fc358 fix typo 2007-02-24 02:45:24 +00:00
Marcus Boerger
50ea26760d - Avoid sprintf, even when checked copy'n'paste or changes lead to errors 2007-02-24 02:17:47 +00:00
Antony Dovgal
22a866818b fix test 2007-02-21 19:22:28 +00:00
Nuno Lopes
3d65d6d8d9 Fixed bug #37799 (ftp_ssl_connect() falls back to non-ssl connection) 2007-02-13 18:29:10 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Hannes Magnusson
b12e3e1475 Fix tests 2006-12-19 10:03:24 +00:00
Antony Dovgal
e1a63af85b MFH: fix leaks 2006-12-03 13:59:11 +00:00
Nuno Lopes
e65bdffab5 tests + BFN 2006-12-01 16:37:39 +00:00
Nuno Lopes
8e0cf44164 fix bug #39458: ftp_nlist() returns false on empty dirs 2006-12-01 16:34:43 +00:00
Antony Dovgal
a3c2958f22 MFH: fix test on FreeBSD 2006-11-27 11:43:59 +00:00
Nuno Lopes
e8384cbcca more tests 2006-11-24 20:18:54 +00:00
Nuno Lopes
d64b17543c fix tests after Tony's commit and add a test for the bug he fixed 2006-11-24 15:47:45 +00:00
Antony Dovgal
050e32ed65 fix test 2006-11-24 13:40:43 +00:00
Antony Dovgal
7f235792b3 MFH: fix #39583 (ftp_put() does not change transfer mode to ASCII) 2006-11-24 12:39:39 +00:00
Nuno Lopes
94a810755f add tests for 2 old bugs 2006-11-23 20:47:38 +00:00
Nuno Lopes
ba8ba5a909 add two more tests (test bogus parameters and bogus server respsnes) 2006-11-23 17:34:34 +00:00
Nuno Lopes
bd519ae0d9 new tests. what a crazy idea... 2006-11-19 18:37:28 +00:00
Hannes Magnusson
21b0f60332 MFH: argument infos 2006-06-11 20:03:05 +00:00
Antony Dovgal
bace0def1e fix spelling in error messages:
greater/less thEn -> greater/less thAn
2006-04-03 09:14:33 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
3e669bc950 MFH: nuke php3 legacy 2005-12-06 02:28:41 +00:00
Ilia Alshanetsky
82814fc852 Fixed bug #31971 (ftp_login fails on some SSL servers).
Patch by: frantisek at augusztin dot com
2005-11-05 22:02:15 +00:00
Brian France
890bd3f002 Fixed phpize build (default PHP_OPENSSL to no if not set) 2005-11-01 00:32:21 +00:00
foobar
b1d0f9bb43 typofix 2005-10-09 20:44:02 +00:00
foobar
e403b15ebb MFH: - Fixed bug #34796 (missing SSL linking in ext/ftp when configured as shared). 2005-10-09 20:39:42 +00:00
foobar
286d53397a MFH 2005-08-18 12:40:41 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Ilia Alshanetsky
b36d4ae02c Added bindto socket context option. 2005-06-14 02:39:42 +00:00
Ilia Alshanetsky
fed3058fba Fixed compiler warning on win32. 2005-03-17 17:16:43 +00:00
Ilia Alshanetsky
ff80321587 Final set of fixes for bug #27633.
# Many thanks to Edin for helpind analyze and resolve this bug.
2005-03-10 23:37:45 +00:00
Ilia Alshanetsky
21ff96859e Fixes to ascii downloads on win32. 2005-03-09 20:52:38 +00:00
Ilia Alshanetsky
f2eb0acfcf Fixed bug #27633 (Double \r\r problem on ftp_get in ASCII mode on Win32). 2005-02-17 15:37:24 +00:00
Ilia Alshanetsky
e35adfe522 Fixed bug #30027 (Possible crash inside ftp_get()).
# Patch by cfield at affinitysolutions dot com
2004-10-05 23:53:09 +00:00
Anantha Kesari H Y
5da74deab9 removed unwanted NEW_LIBC checks 2004-09-27 14:29:55 +00:00
Anantha Kesari H Y
e12ea3c30d removed redundant NEW_LIBC check 2004-09-27 14:25:13 +00:00
Wez Furlong
99e290f882 Fix for Bug #24189: possibly unsafe select(2) usage.
We avoid the problem by using poll(2).

On systems without poll(2) (older bsd-ish systems, and win32), we emulate
poll(2) using select(2) and check for valid descriptors before attempting
to access them via the descriptor sets.

If an out-of-range descriptor is detected, an E_WARNING is raised suggesting
that PHP should be recompiled with a larger FD_SETSIZE (and also with a
suggested value).

Most uses of select(2) in the source are to poll a single descriptor, so
a couple of handy wrapper functions have been added to make this easier.

A configure option --enable-fd-setsize has been added to both the unix and
win32 builds; on unix we default to 16384 and on windows we default to 256.
Windows FD_SETSIZE imposes a limit on the maximum number of descriptors that
can be select()ed at once, whereas the unix FD_SETSIZE limit is based on the
highest numbered descriptor; 256 should be plenty for PHP scripts under windows
(the default OS setting is 64).

The win32 specific parts are untested; will do that now.
2004-09-17 12:44:56 +00:00
Ilia Alshanetsky
dbc60edabf Fixed bug #27809 (ftp_systype returns null on some ftp servers). 2004-03-31 20:43:40 +00:00
Hartmut Holzgraefe
eeb172b29f "The Visa to Sibiria" (work in progress)
Adding a package.xml to a bundled extension does not only
ease the transition to PECL whereever suitable but also
allows to build and install an extension as "shared" using
the PEAR installer without having to deal with phpize and
friends by hand
2004-03-23 19:46:10 +00:00
Ilia Alshanetsky
b176ee99d3 Fixed bug #27633 (Incorrect EOL translation by ftp_get() in ASCII mode). 2004-03-18 17:12:07 +00:00
Sara Golemon
85aa47efab Don't rely on ANSI tmpfile(), use the streams layer instead, it'll deal with platform issues. 2004-03-04 22:24:27 +00:00
Ard Biesheuvel
81f05c18f5 Wordsize fixes 2004-02-25 20:16:27 +00:00
Sara Golemon
c23305e184 Avoid use of memcpy(), reply on struct in_addr to be right sized instead 2004-02-21 19:37:37 +00:00
Sara Golemon
4113da3f86 s_addr is always unsigned 32bit, long is not. 2004-02-20 21:05:37 +00:00
foobar
5b59254761 - Fixed bug #26896 (ext/ftp does not work as shared extension) 2004-01-13 18:58:23 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Sara Golemon
d516184885 Fail loudly, silence bogus bugs. 2003-12-16 19:41:26 +00:00
Wez Furlong
bf033aa5a8 Fix ftp build when openssl is built as a shared extension. 2003-12-06 16:12:10 +00:00
Wez Furlong
dbb152b96a Detect and enable IPv6 support under win32.
The ws2tcpip.h header links to IPv6 functions dynamically
and the generated binary will run on win98 and later.
2003-12-06 00:00:31 +00:00
Wez Furlong
05b9b20ed8 Add new (optional!) win32 build infrastructure.
Will follow up to internals@ shortly.
2003-12-02 23:17:04 +00:00
Ilia Alshanetsky
046904f2b1 Fixed bug #26113 (remove leftover local file when ftp_get/ftp_nb_get fails) 2003-11-04 20:56:47 +00:00
Sara Golemon
0a3bc21c5c Manageability 2003-09-18 17:51:55 +00:00
Sara Golemon
c553af47e0 Add ftp_alloc() for servers which require client to predeclare filesize to be sent. 2003-09-18 17:36:08 +00:00
Sara Golemon
4e6672eadd Fix Bug #25294 LIST/NLST can cause segfault because ftp->data not cleaned properly 2003-09-09 21:12:49 +00:00
Sara Golemon
4936234fd8 MFB(r-1.74.2.13) Bug #25314 ASCII mode transfers behaving like binary when initiated from windows. 2003-09-08 22:40:12 +00:00
Ilia Alshanetsky
07f864d06b Make sure that ftp->data is nulled after it's freed. This may fix bug
#25294 & bug #25296.
2003-08-31 21:07:01 +00:00
Ilia Alshanetsky
9d9727aac5 Fixed compiler warnings. 2003-08-28 19:17:34 +00:00
Ilia Alshanetsky
93bcd55eaf emalloc -> safe_emalloc 2003-08-12 00:58:52 +00:00
Zeev Suraski
23f08b9a2f fix another broken prototype 2003-08-07 16:03:17 +00:00
Zeev Suraski
2e869c7cb3 Fix prototype 2003-08-07 16:02:28 +00:00
foobar
3a7ca909be - HAVE_OPENSSL_EXT is not defined always. 2003-06-27 16:41:41 +00:00
Andrey Hristov
eb33adf139 proto fixes 2003-06-15 15:29:46 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Moriyoshi Koizumi
08bf402440 Fixed bug #23683 2003-05-19 13:26:28 +00:00
Sara Golemon
c9651182c6 MFB(r-1.74.2.8) Bug #14369. ftp extension allows circumvention of safe_mode restrictions. HEAD version of this patch uses the simpler open_wrapper approach to applying safe mode restrictions. Also allows writting to/from wrappers this way. 2003-05-17 04:21:57 +00:00
Ilia Alshanetsky
6965f229a6 MFH 2003-04-03 00:55:56 +00:00
Sebastian Bergmann
5ca078779a Eliminate some TSRMLS_FETCH() calls. Tested with Win32 build of SAPI/CGI and SAPI/CLI on Win32. 2003-03-25 08:07:13 +00:00
foobar
d0ac3d0646 Fixed bug #22765 2003-03-18 17:30:32 +00:00
David Hill
4f8ae7b111 fixing missed int to long with zend_parse_parameters 2003-03-10 15:52:10 +00:00
David Hill
5c90216d2c 64-bit correction to variables passed to zend_parse_parameters
@64-bit correction to variables passed to zend_parse_parameters (Dave)
2003-03-06 23:07:28 +00:00
Wez Furlong
349ce76f96 Tidy up stupid signed/unsigned issues with win32 by introducing a php_socket_t typedef. 2003-02-28 21:03:36 +00:00
Wez Furlong
1b53a2d12e New user-space functions:
. stream_socket_client() - similar to fsockopen(), but more powerful.
  . stream_socket_server() - Creates a server socket.
  . stream_socket_accept() - Accept a client connection.
  . stream_socket_get_name() - Get local or remote name of socket.

Tidy up some leaks and debug printfs.
Move more streams functions into streamsfuncs.c and streamsfuncs.h.
2003-02-28 19:53:21 +00:00
foobar
08b5f6b2b9 - No need to include the ssl headers elsewhere but in ext/openssl
# ext/ftp doesn't use streams yet so it needs to include them.
2003-02-28 07:25:15 +00:00
Wez Furlong
0a18a9d744 A add much more useful select(2) implementation than is provided by
windows sockets.  The winsock implementation will only work with sockets;
our implementation works with sockets and file descriptors.
By association, stream_select() will now operate correctly with files, pipes and sockets.

This change required linking against the winsock2 library.  In terms of
compatibility, only older versions of windows 95 do not have winsock2
installed by default.  It is available as a redistributable file, and is most likely installed by any OS patches (eg: Internet Explorer) applied by the user.

Also, add a win32 compatible pipe test when opening a stream from a pipe.  This test will only work on NT, win2k and XP platforms.  Without this test, interleaved fread() and select() calls would cause the read buffer to be clobbered.  I will be working on a fix for this issue for win9x.
2003-02-16 03:48:49 +00:00
Ilia Alshanetsky
c59240d599 CS fixes. 2003-02-14 20:15:11 +00:00
Sara Golemon
a9e1b5f641 MFB(r-1.68.2.5) Bug 22052 2003-02-13 22:20:21 +00:00
Sara Golemon
d1d0d0b71a Bug #22059. ftp_chdir() causes segfault. efree(ftp->pwd) was being called without knowing for certain that ftp->pwd
actually pointed anywhere.
2003-02-13 19:48:49 +00:00
Sara Golemon
81797baed4 Add ftp_raw() to send raw command strings to an FTP server. 2003-01-31 04:54:57 +00:00
Sara Golemon
d0cb097c52 Fix potential buffer overflow. 2003-01-27 19:51:50 +00:00
Sara Golemon
761fa96412 Feature Request #21748. Added function ftp_chmod(). 2003-01-27 02:54:12 +00:00
Ilia Alshanetsky
928c260c57 ZTS cleanup. 2003-01-07 13:02:43 +00:00
Ilia Alshanetsky
f0de896ed2 Fixed ZTS build. 2003-01-07 03:44:12 +00:00
Ilia Alshanetsky
34e868d451 MFB + CS 2003-01-07 02:47:24 +00:00
Anantha Kesari H Y
90ba724072 Modified for NetWare. 2003-01-03 14:24:07 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Derick Rethans
f3d3dd5bc8 - MFB 2002-12-26 23:45:05 +00:00
Ilia Alshanetsky
33de9befa1 Fixed bug #20812, ftp_get returned NULL on success instead of TRUE. 2002-12-06 06:07:40 +00:00
Ilia Alshanetsky
b855893b0c Fixed ZTS build
Fixed 2 ZTS related warnings
2002-10-13 01:40:46 +00:00
Stefan Esser
4368b8e4ac some FTP servers return 32bit port numbers. 2002-10-04 22:20:08 +00:00
Stefan Esser
8fae3d7a49 swapped conditions to correct the logic 2002-10-03 12:16:44 +00:00
Stefan Esser
b220b7113f Added ftp_ssl_connect() for FTP over SSL. 2002-10-03 11:33:05 +00:00
Stefan Esser
8827f8eca9 renamed ftp_async_* into ftp_nb_* 2002-10-03 09:10:24 +00:00
Wez Furlong
0141e97052 Make these all work with persistent streams too. 2002-09-25 15:46:47 +00:00
Wez Furlong
ad4afdf827 fix some warnings. 2002-09-23 14:50:21 +00:00