Commit Graph

110512 Commits

Author SHA1 Message Date
Christoph M. Becker
c40a494406 Fix #79561: dns_get_record() fails with DNS_ALL
Since Windows has its own definitions of the `PHP_DNS_*` macros, we
have to use these when registering the PHP constants.
2020-05-04 22:59:38 +02:00
Nikita Popov
7c1316ec6a Fixed bug #79535
We did not allocate a cache slot for FETCH_CLASS. This is already
fixed on newer PHP versions.
2020-05-04 14:51:18 +02:00
Christoph M. Becker
d950969e59 Add basic sapi_windows_cp_conv() test
This function is lacking any tests so far.
2020-05-04 11:50:03 +02:00
Christoph M. Becker
54148fd686 Fix #79528: Different object of the same xml between 7.4.5 and 7.4.4
Revert "Fix #61597: SXE properties may lack attributes and content"

This reverts commit 7c081db885.
2020-05-01 12:37:39 +02:00
Christoph M. Becker
6998cc5029 Bump version 2020-04-28 09:10:50 +02:00
Christoph M. Becker
29968d8f99 Fix #79470: PHP incompatible with 3rd party file system on demand
We add support for Activision HSM (`IO_REPARSE_TAG_ACTIVISION_HSM`) and
VFS for Git (`IO_REPARSE_TAG_PROJFS`).  The latter fixes bug #78784.
2020-04-27 09:30:57 +02:00
Derick Rethans
b962d2e36f Updated to version 2020.1 (2020a) 2020-04-24 12:31:30 +01:00
Graham Campbell
51fb8398e2 Add additional preg_match test case
(cherry picked from commit a1a044dcc7
on author's explicit request)
2020-04-23 17:35:09 +02:00
Christoph M. Becker
ccca2c448d Fix #79503: Memory leak on duplicate metadata
Duplicate metadata can only happen if someone tampers with the phar, so
we can and should treat that as error.
2020-04-22 15:07:46 +02:00
Christoph M. Becker
fa10abd6d7 Fix #79491: Search for .user.ini extends up to root dir
The `start` parameter of `php_cgi_ini_activate_user_config` is supposed
to hold the byte offset of the doc root in the given `path`.  However,
the current expression which fixes a potential type incompatibility
will ever only evaluate to zero or one, because it uses the *logical*
and operator (`&&`).  Furthermore we notice that subtracting one from
`doc_root_len` is not necessary, so there is even no need for the
`start` parameter at all.
2020-04-20 10:56:36 +02:00
Nikita Popov
f62571c121 Apply doc root fix for FPM
This is the change from GH-5417 but for FPM. This was stripping the
last character from the doc_root. Given how it is used, this should
be harmless, but let's make it less confusing...
2020-04-20 10:47:54 +02:00
Joe Cai
94e09bfe55 Fix #79497: Fix php_openssl_subtract_timeval()
I stumbled upon this while debugging a strange issue with
stream_socket_client() where it randomly throws out errors when
the connection timeout is set to below 1s. The logic to calculate
time difference in php_openssl_subtract_timeval() is wrong when
a.tv_usec < b.tv_usec, causing connection errors before the timeout
is reached.
2020-04-20 10:25:54 +02:00
Dmitry Stogov
d31ccb5fc8 zend_timeout() may access EX(opline) 2020-04-17 14:55:14 +03:00
guirish
a1c1736bfb Fix MySQL local infile / attr handling on big endian systems
Make sure pointer types match what is used by libmysql everywhere.

Closes GH-5380.
2020-04-16 11:22:17 +02:00
Nikita Popov
79a36ff7f3 Fixed bug #79477
Make sure to deindirect properties when creating array.
2020-04-15 11:21:05 +02:00
Christoph M. Becker
c4cdf1ae12 Add missing CVE 2020-04-14 18:18:18 +02:00
Sara Golemon
bef96b9d2c Update NEWS for 7.2.31 2020-04-14 15:38:55 +00:00
Sara Golemon
cf083535f8 Update CREDITS for PHP 7.2.30 2020-04-14 15:16:26 +00:00
Sara Golemon
bd49622a9a Update NEWS for PHP 7.2.30 2020-04-14 15:16:26 +00:00
Sara Golemon
2814850fd9 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #79468
  NEWS
2020-04-14 10:31:35 -04:00
dinosaur
13842eda37 Fixed bug #79468
Close the stream filter resources when removing them from the stream.
2020-04-14 10:27:28 -04:00
Sara Golemon
6df761b7ff NEWS 2020-04-14 10:25:37 -04:00
Nikita Popov
b56fb9019e Don't leak peername if accept fails
Even if the accept fails, the peername may be populated.
2020-04-14 16:07:39 +02:00
Christoph M. Becker
a1b46fc152 Fix test cases 2020-04-14 13:58:48 +02:00
dinosaur
95eaccd0bb Fixed bug #79468
Close the stream filter resources when removing them from the stream.
2020-04-14 11:59:51 +02:00
Christoph M. Becker
8967588702 Add NEWS entries [ci skip] 2020-04-14 08:54:00 +02:00
Stanislav Malyshev
d539e61c30 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #79465 - use unsigneds as indexes.
  Fix bug #79330 - make all execution modes consistent in rejecting \0
2020-04-13 21:09:08 -07:00
Stanislav Malyshev
9d6bf8221b Fix bug #79465 - use unsigneds as indexes. 2020-04-13 21:08:37 -07:00
Stanislav Malyshev
14fcc81394 Fix bug #79330 - make all execution modes consistent in rejecting \0 2020-04-13 21:08:30 -07:00
Christoph M. Becker
7e91fcd7f9 Fix memory leak introduced by fixing bug #78221
We have to free the retrieved text content; to keep the code readable,
we extract a helper function to check for empty nodes.  Unfortunately,
we cannot use xmlIsBlankNode(), because that also recognizes whitespace
only text content.

We also make sure to properly handle NULL returns from
xmlNodeGetContent().
2020-04-08 10:35:54 +02:00
George Peter Banyard
a0df5f3b54 Revert "Went to fast and forgot to update tests"
This reverts commit 656eac74fa.
2020-04-07 22:24:40 +02:00
George Peter Banyard
6031b08240 Revert "Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails"
This commit brings some substantial changes in behaviour due to the weird implementation.
This will be fixed in master due to BC concerns.

This reverts commit 1333b46d6d.
2020-04-07 22:23:24 +02:00
Christoph M. Becker
efec22b7be Fix #78221: DOMNode::normalize() doesn't remove empty text nodes
If a text node is not followed by another text node, we remove it, if
its textContent is empty.
2020-04-07 13:04:14 +02:00
George Peter Banyard
656eac74fa Went to fast and forgot to update tests
However due to the really lax conversion to integer all strings pass as 0
2020-04-03 22:03:00 +02:00
George Peter Banyard
1333b46d6d Fix Bug #79448 0 is a valid Unicode codepoint, but mb_substitute_character(0) fails 2020-04-03 21:18:45 +02:00
Qianqian Bu
ee21657a6a Fix incorrect free for last_message
In commit a7305eb539 the last_message
field of the connection object was changed to be always non-persistent.
But there is a place on change_user path that still treats it
depending on conn->persistent flag. This will cause PHP crash after
com_change_user success when there is last_message set
2020-04-03 10:05:16 +02:00
Nikita Popov
cf68bc413b Fixed bug #79434 2020-04-02 16:34:03 +02:00
Nikita Popov
14b770d407 Fix literal compaction collision between string and double
For the sake of simplicity I'm using a separate hashtable, rather
than trying to do hash perturabation on the double strings.
2020-04-01 14:20:59 +02:00
Christoph M. Becker
cc3af6fdea Add NEWS entryc [ci skip] 2020-04-01 09:26:20 +02:00
George Peter Banyard
18dc9044f5 Fix bug 79441 2020-04-01 04:29:20 +02:00
Christoph M. Becker
33226c3a17 Next is 7.3.18 2020-03-31 10:22:55 +02:00
Christoph M. Becker
b510250b8e Fix #79413: session_create_id() fails for active sessions
The comment on `PS_VALIDATE_SID_FUNC(files)` is very clear that the
function is supposed to return `SUCCESS` if the session already exists.
So to detect a collision, we have to check for `SUCCESS`, not
`FAILURE`.

We also fix the wrong condition in session_regenerate_id() as well.
2020-03-31 08:38:23 +02:00
Christoph M. Becker
a681b12820 Fix #79427: Integer Overflow in shmop_open()
If `shm.shm_segsz > ZEND_LONG_MAX` the assignment to `shmop->size` a
few lines below would overflow, so we catch that early and bail out if
necessary.
2020-03-30 08:56:49 +02:00
Max Rees
04920645f1 Fix #79424 ext/zip: don't use gl_pathc after call to globfree
This breaks on Linux with the musl libc, since it zeroes out gl_pathc during
globfree.
2020-03-29 14:22:31 +02:00
Lukas Berger
7f9b534e3a Add missing 'skip' to bug79332.phpt skip message
The skip message must start with the word 'skip', otherwise the test will not be skipped.

*Before:*
Running selected tests.
TEST 1/1 [ext/com_dotnet/tests/bug79332.phpt]
========DIFF========
001+ Fatal error: Uncaught Error: Class 'COMPersistHelper' not found in /srv/php/ext/com_dotnet/tests/bug79332.php:2
001- A com_exception has been thrown
002+ Stack trace:
003+ #0 {main}
004+   thrown in /srv/php/ext/com_dotnet/tests/bug79332.php on line 2
========DONE========
FAIL Bug #79332 (php_istreams are never freed) [ext/com_dotnet/tests/bug79332.phpt]

*After:*
Running selected tests.
SKIP Bug #79332 (php_istreams are never freed) [ext/com_dotnet/tests/bug79332.phpt] reason: com_dotnet extension not available
2020-03-26 23:14:10 +01:00
Dmitry Stogov
65120cfc09 Fixed bug #79412 (Opcache chokes and uses 100% CPU on specific script). 2020-03-25 17:31:06 +03:00
Christian Schneider
c0840fec9c Fix bug #79410 (system() swallows last chunk if it is exactly 4095 bytes without newline)
Closes GH-5292.
2020-03-25 10:50:35 +01:00
Nikita Popov
2e8db5d6be Add test file
Forgot the git add again...
2020-03-23 17:13:57 +01:00
Nikita Popov
34f1266a9c Handle NULL caller_call_opline
This can happen if there is an EXIT in the call arguments, in which
case the DO_CALL opcode may be eliminated as unreachable.
2020-03-23 17:12:01 +01:00
Christoph M. Becker
ba404f21e4 Fix test for Windows
Windows filenames may very well contain a colon, so we adjust the test
accordingly.
2020-03-23 16:22:45 +01:00