Commit Graph

115299 Commits

Author SHA1 Message Date
Christoph M. Becker
59522ba968
Update version in php_version.h as well
The version there is automatically updated during `./configure`, but
not on Windows.
2021-05-22 15:42:57 +02:00
Nikita Popov
ee7a8acde9 Fix handling of open_basedir that contains cwd
While resolving the path, the last step will reduce it down to ""
(an empty string) and realpath() will resolve this to getcwd().
If open_basedir contains the CWD, then that means open_basedir
will be bypassed for paths that don't have any components that
exist (if one of the components exists, then we abort the realpath
loop at that point).

Closes GH-7015.
2021-05-20 09:52:21 +02:00
Christoph M. Becker
36b9bdeeec
Fix #81048: phpinfo(INFO_VARIABLES) "Array to string conversion"
Now that we properly dereference references of the superglobals. we
also need to dereference contained references to avoid to string
conversion.

Closes GH-7014.
2021-05-19 14:07:15 +02:00
Derick Rethans
3938bfb564 The PHP 7.4 branch is now for 7.4.21 2021-05-18 13:44:01 +01:00
Graham Campbell
66c3a174f5
[ci skip] Removed incorrect news entry
Closes GH-7007.
2021-05-18 12:34:46 +02:00
Christoph M. Becker
fb86a176ba
Properly push test artifacts
Cf. https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts.

Closes GH-6990.
2021-05-16 14:45:06 +02:00
Kamil Tekiela
ead72aabfb
Fix NEWS 2021-05-14 12:33:32 +01:00
Kamil Tekiela
6afbb74194
Fixed bug #81037 PDO discards error message text from prepared statement 2021-05-14 11:54:49 +01:00
Flavio Heleno
28e7addb9d
Fix #81032: GD install is affected by external libgd installation
This PR replaces the bundled libgd includes from #include <foo.h> with
#include "foo.h" for gd-related headers to avoid including headers that
may be available in system directories instead of the expected local
headers.

Closes GH-6975.
2021-05-14 12:24:45 +02:00
Christoph M. Becker
f6c15e2caf
Disable LSan for all PDO_Firebird tests
The tests leak memory, likely due to a slightly unclean shutdown of
libfbclient.  To avoid failing CI, we disable LSan for all the tests.

Closes GH-6966.
2021-05-13 23:30:17 +02:00
Christoph M. Becker
23a3bbb468
Fix #44643: bound parameters ignore explicit type definitions
If `SQLDescribeParam()` fails for a parameter, we must not assume
`SQL_LONGVARCHAR` for any param which is not `PDO_PARAM_LOB`.  At least
mapping `PDO_PARAM_INT` to `SQL_INTEGER` should be safe, and not
introduce a BC break.

Closes GH-6973.
2021-05-12 13:30:51 +02:00
Joe Watkins
ef3e0ee08a
missing ; 2021-05-11 11:10:38 +02:00
Joe Watkins
2558acbd66
Fixed bug #65800 php-fpm: fix Solaris port events.mechanism 2021-05-11 11:05:39 +02:00
Petr Sumbera
04078a597c
php-fpm: fix Solaris port events.mechanism
Bug #65800
Fix by: rainer.jung@kippdata.de
2021-05-11 11:01:38 +02:00
Christoph M. Becker
57918b1a1b
Fix #80863: ZipArchive::extractTo() ignores references
We need to cater to references, when traversing the files to extract.
While we're at it, we move the `zval_file` declaration into a narrower
scope.

Closes GH-6959.
2021-05-07 19:15:29 +02:00
Nikita Popov
8deadfa31b Fix azure build
This is only needed on ubuntu-18.04, it works fine on ubuntu-20.04.
2021-05-07 10:26:04 +02:00
Christoph M. Becker
f95f8a3c1e
Add simple Firebird payload fake server to test suite
This is meant to test against certain fixed responses of Firebird
servers.  For now we add just a most basic test which verifies a
connection attempt.

Closes GH-6940.
2021-05-06 14:47:57 +02:00
Nikita Popov
178bbe3478 Fixed bug #81015
Make sure that the previous opline is part of the same block,
otherwise it may be non-dominating.

The test case does not fail on PHP-7.4, but I think the general
problem can appear on 7.4 as well, so I'm applying the patch to
that branch.
2021-05-06 10:46:00 +02:00
Nikita Popov
896e4d3428
Add CONFLICTS file for PDO firebird tests
Just in case anybody executes these test in parallel on PHP 7.4.

(cherry picked from commit b4ffe54174)

Closes GH-6943.
2021-05-05 15:24:30 +02:00
Christoph M. Becker
125fc0b8d4
Update version in php_version.h as well
The version there is automatically updated during `./configure`, but
not on Windows.
2021-05-05 15:18:46 +02:00
Christoph M. Becker
0cafd53d18
Fix #81011: mb_convert_encoding removes references from arrays
We need to dereference references.

Closes GH-6938.
2021-05-04 18:37:40 +02:00
Derick Rethans
0328ff49cc Reset PHP-7.4 for 7.4.20 2021-05-04 12:18:27 +01:00
Christoph M. Becker
42c72ef463
Fix #79100: Wrong FTP error messages
First we need to properly clear the `inbuf`, what is an amendment to
commit d2881adcbc[1].

Then we need to report `php_pollfd_for_ms()` failures right away; just
setting `errno` does not really help, since at least in some cases it
would have been overwritten before we actually could check it.  We use
`php_socket_strerror()` to get a proper error message, and define
`ETIMEDOUT` to the proper value on Windows; otherwise we catch the
definition in errno.h, which is not compatible with WinSock.  The
proper solution for this issue would likely be to include something
like ext/sockets/windows_common.h.

Finally, we ensure that we only report warnings using `inbuf`, if it is
not empty.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=d2881adcbc9be60de7e7d45a3316b0e11b7eb1e8>.

Closes GH-6718.
2021-05-03 15:19:57 +02:00
Christoph M. Becker
272df442f5
Fix #73246: XMLReader: encoding length not checked
libxml2 expects the passed encoding to be NUL terminated, so we reject
strings with NUL bytes right away.

Closes GH-6899.
2021-05-03 12:26:37 +02:00
Matteo Beccati
b8e49fe872
Revert "Fix #80892: PDO::PARAM_INT is treated the same as PDO::PARAM_STR"
This reverts commit 340a06778c.
2021-04-29 11:59:16 +02:00
Nikita Popov
5acab7ebb4 filter_var_array() may return array_of_ref
This function preserves references in the input array.
2021-04-28 11:27:14 +02:00
Nikita Popov
67c4d1f5b9 fetch_assoc may return array_key_long
If the column name is a number (which is possible at least via
AS clauses), then symtable canonicalization will convert it into
an integer key.
2021-04-28 11:18:36 +02:00
Nikita Popov
c340f97ab0 password_get_info() may return array_of_null
The algo key is set to null if the algorithm can't be detected.
2021-04-28 10:54:31 +02:00
Nikita Popov
c7387ab92f getdate() may return array_key_long
This function mostly uses string keys, but the timestamp is
returned at key 0 (why???)
2021-04-28 10:46:37 +02:00
Nikita Popov
3f71ba2611 Remove incorrect format argument
rc is not used by the printf format.
2021-04-27 22:22:32 +02:00
Christoph M. Becker
7f83976200
Fix #80460: ODBC doesn't account for SQL_NO_TOTAL indicator
The `StrLen_or_IndPtr` parameter usually may be `SQL_NO_TOTAL`; we need
to cater to that possibility to avoid working with negative string
lengths and other issues.  A noteable exemption are calls to
`SQLGetData()` which return `SQL_SUCCESS`; in that case `SQL_NO_TOTAL`
can not occur.

Closes GH-6809.
2021-04-27 17:09:36 +02:00
Christoph M. Becker
66308af539
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  7.3.29 is next
2021-04-27 16:56:53 +02:00
Christoph M. Becker
98c8ad9218
7.3.29 is next 2021-04-27 16:55:20 +02:00
Christoph M. Becker
20b62ade29
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix ./makedist wrt. to GH move
2021-04-27 15:49:59 +02:00
Christoph M. Becker
096f148c61
Fix ./makedist wrt. to GH move
We can no longer export from git.php.net, and apparently exporting from
Github is not supported.  We apply a quick fix to export from the local
clone by default, still leaving an option to export from some other
repo.  This is, unfortunately, a minor BC break in a security release.

Co-authored-by: Remi Collet <remi@php.net>

Closes GH-6919.
2021-04-27 15:48:58 +02:00
Christoph M. Becker
12e15be921
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Add missing NEWS entry for #80710
2021-04-27 13:41:20 +02:00
Christoph M. Becker
60a68a45c3
Add missing NEWS entry for #80710 2021-04-27 13:38:39 +02:00
Nikita Popov
310c0561a9 Fix build warning
This causes the build to fail on PHP-8.0 and higher.
2021-04-27 10:10:22 +02:00
Stanislav Malyshev
568df31698
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80710: imap_mail_compose() header injection
2021-04-26 21:48:16 -07:00
Christoph M. Becker
37962c61d2
Fix #80710: imap_mail_compose() header injection
Like `mail()` and `mb_send_mail()`, `imap_mail_compose()` must prevent
header injection.  For maximum backward compatibility, we still allow
header folding for general headers, and still accept trailing line
breaks for address lists.
2021-04-26 21:43:03 -07:00
Stanislav Malyshev
2b3346208a
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Revert "Fix #80852: Stack-overflow when json_encode()'ing SimpleXMLElement"
2021-04-26 21:02:03 -07:00
Stanislav Malyshev
1b88c85cd8
Revert "Fix #80852: Stack-overflow when json_encode()'ing SimpleXMLElement"
Sorry, this solution seems to have BC breaks, will need to look
for better one.

This reverts commit 9f7e8b777c.
2021-04-26 21:01:25 -07:00
Stanislav Malyshev
76637017ac
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80852: Stack-overflow when json_encode()'ing SimpleXMLElement
2021-04-26 20:50:15 -07:00
Christoph M. Becker
9f7e8b777c
Fix #80852: Stack-overflow when json_encode()'ing SimpleXMLElement
We ignore `XML_ENTITY_DECL` nodes when getting the hash of the
properties of a `SimpleXMLElement`.
2021-04-26 20:43:45 -07:00
Christoph M. Becker
c0ae3a7fb7
Fix #80901: Info leak in ftp extension
We ensure that inbuf is NUL terminated on `ftp_readline()` failure.

Closes GH-6894.
2021-04-26 15:07:08 +02:00
Christoph M. Becker
7f9183ce20
Fix typo in NEWS 2021-04-26 15:02:13 +02:00
George Peter Banyard
97f8ca52fa
Fix Bug #80972: Memory exhaustion on invalid string offset
Closes GH-6909
2021-04-26 13:22:12 +01:00
Christoph M. Becker
a2771296c0
Export gzfwrite()
Extensions calling `gzfwrite()` cannot be built when linked against
php.dll (built with zlib support) otherwise.

Closes GH-6880.
2021-04-26 12:09:31 +02:00
Christoph M. Becker
39ddf6b89c
Fix #67792: HTTP Authorization schemes are treated as case-sensitive
We use `zend_binary_strncasecmp()` to avoid any locale issues, and
refactor.  We also add a test case for Digest authentication.

Closes GH-6900.
2021-04-23 15:54:17 +02:00
David Rans
054fad6d63 PHPDBG: fix bug parsing 3-word opcodes
PHPDBG won't parse opcodes correctly if they are more than two words
separated by underscores (as many opcodes, like ZEND_POST_INC, are).

Now opcodes that have more than one underscore (e.g. ZEND_POST_INC) are
parsed correctly.

Closes GH-6895.
2021-04-22 10:11:26 +02:00