1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Commit Graph

135925 Commits

Author SHA1 Message Date
Niels Dossche
6db12e7cd8 Fix bug #67563: mysqli compiled with mysqlnd does not take ipv6 adress as parameter
In the past, when libmysqlclient could be used, it accepted ipv6 addresses
as hostname without enclosing it first in brackets. However, in mysqlnd
this never worked. In the past this caused a discrepancy between the two
implementations.
Nowadays, mysqli only works with mysqlnd so we don't even have to cater
to libmysqlclient. However, a plain ipv6 address should still work as a
hostname. Also for people migrating to newer PHP versions it's nice if
this keeps working.

The solution is to check if we're dealing with an ipv6 address not yet
enclosed in brackets. In that case we add the brackets automatically.

Closes GH-19750.
2025-09-30 15:20:14 +02:00
Niels Dossche
21c2c07a24 Fix GH-19998: ext/standard/tests/file/bug46347.phpt sometimes fails: racy in parallel
The same test file name is already used in parse_ini_file.phpt.

Closes GH-20000.
2025-09-30 10:52:59 +02:00
David Carlier
e029f8f45b Fix GH-19955: imagefttext() memory leak
close GH-19968
2025-09-29 23:20:27 +01:00
David Carlier
93bac8cb1a Fix GH-19922: gzopen() double free
close GH-19924
2025-09-29 22:47:29 +01:00
David Carlier
3ee56f68ed Fix GH-19932: Zip::setEncryptionName()/setEncryptionIndex() memory leak.
On successive usage, the password is copied as much but the older
address is never freed. Thus, we are hinting a password reset to address
it.

close GH-19936
2025-09-29 22:10:17 +01:00
Niels Dossche
190f427198 Fix NEWS order 2025-09-29 16:07:45 +02:00
Niels Dossche
d94846c3b4 Fix GH-19988: zend_string_init with NULL pointer in simplexml (UB)
Normally, simplexml cannot import document nodes,
but xsl allows to circumvent this.
A document does not have a name, so we return the empty string
in that case.
While we could add an explicit check, we might as well switch
the macro to a form that would be more optimal anyway as many
tag names can be single characters.

The test was added in xsl because adding it in simplexml would
break out-of-tree builds of simplexml.

Closes GH-19990.
2025-09-29 16:07:34 +02:00
Ilija Tovilo
8756ee034d Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Change master branch check to 8.6
2025-09-28 11:56:11 +02:00
Ilija Tovilo
5dd764b1b3 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Change master branch check to 8.6
2025-09-28 11:56:01 +02:00
Shivam Mathur
107075605d Change master branch check to 8.6 2025-09-28 09:54:13 +05:30
Jakub Zelenka
f9dc073b04 Add stream filter convert.* tests (#19976)
The convert.* filters are quite untested so this tries to improve it.

Closes GH-19976
2025-09-27 12:43:28 +02:00
Ilija Tovilo
68d5ddbda1 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Add 8.6 to nightly_matrix.php
2025-09-23 23:42:12 +02:00
Ilija Tovilo
e370c57156 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Add 8.6 to nightly_matrix.php
2025-09-23 23:42:05 +02:00
Ilija Tovilo
197921a8aa [skip ci] Add 8.6 to nightly_matrix.php 2025-09-23 23:41:42 +02:00
Ilija Tovilo
c6a6cb79f9 [skip ci] Skip php_cli_server_pdeathsig.phpt if pgrep is missing
Fixes GH-19911
Closes GH-19923
2025-09-23 17:14:51 +02:00
Ilija Tovilo
a885372a08 Fix more curl 8.16 issues
The CURLOPT_FOLLOWLOCATION seems like a gcc bug, where the integer extension of
bool to long is lost, but I was unable to reproduce on godbolt.org.
2025-09-23 16:11:19 +02:00
Ilija Tovilo
266cb7d892 Fix curl 8.16.0 compilation with zts 2025-09-22 10:55:59 +02:00
David Carlier
933e087843 Fix GH-19885: dba_fetch() overflow on skip argument.
close GH-19887
2025-09-21 14:23:53 +01:00
Niels Dossche
7a1bb71127 Fix GH-19480: error_log php.ini cannot be unset when open_basedir is configured
Since the ini message handlers already check for basedir, we need to
drop the basedir check from ini_set. Then we also fix the exceptional
case for the empty string: it should bypass the basedir check.
Furthermore, there was a regression introduced with the error_log
"syslog" check in ddfe269a (inverted check), so we fix that as well.

Closes GH-19487
2025-09-19 14:14:53 +02:00
Ilija Tovilo
6eb3faef3b Fix use-of-uninitialized-value in zend_get_arg_offset_by_name()
Don't access fbc->op_array.refcount on internal function. Don't attempt to cache
ZEND_ACC_USER_ARG_INFO at all, which is only used in
zend_get_closure_invoke_method(). This may reuse arg_info from a temporary
closure, and hence caching would also be unsafe.

Also avoid populating the cache slot for variadic parameters, where the
ZEND_ACC_USER_ARG_INFO is set for the same reason.

Closes GH-19856
2025-09-17 15:54:35 +02:00
Alexandre Daubois
75217c16c8 Fix GH-19801: address leak when calling var_dump() with recursion in __debugInfo() (#19837) 2025-09-16 15:05:45 +02:00
Ilija Tovilo
f045716288 Fix incorrect HASH_FLAG_HAS_EMPTY_IND flag on userland array
Fixes GH-19839
Closes GH-19851
2025-09-16 13:00:03 +02:00
Derick Rethans
4ad4d54873 Merge branch 'PHP-8.2' into PHP-8.3 2025-09-15 14:18:03 +01:00
Derick Rethans
be5784dfec Revert "Update timelib to 2022.14"
This reverts commits:
- a0329dbab0
- b42bd2a359
2025-09-15 14:17:32 +01:00
Derick Rethans
e1bd1b2780 Update NEWS 2025-09-15 10:43:18 +01:00
Derick Rethans
b42bd2a359 Update NEWS 2025-09-15 10:42:24 +01:00
Derick Rethans
94dbdd03b7 Merge branch 'PHP-8.2' into PHP-8.3 2025-09-15 10:39:49 +01:00
Derick Rethans
a0329dbab0 Update timelib to 2022.14 2025-09-15 10:38:53 +01:00
Niels Dossche
22252954ef Fix GH-19653: Closure named argument unpacking between temporary closures can cause a crash
Due to user closures, the `fbc` address isn't unique if the memory address is reused.
We need to distinguish using a unique key, and we choose arg_info such
that it can be reused across different functions.

Closes GH-19654.
2025-09-14 22:07:36 +02:00
Niels Dossche
b46681d686 Fix curl build failure on macOS+curl 8.16
Closes GH-19820.
2025-09-13 23:22:22 +02:00
Niels Dossche
d30dd1b47b Fix GH-19784: SoapServer memory leak
Closes GH-19818.
2025-09-13 10:15:22 +02:00
Tim Düsterhus
b8a9d790af [skip ci] Add missing name for GH-19813 in NEWS 2025-09-12 20:55:00 +02:00
Tim Düsterhus
871fe600c2 curl: Fix cloning of POST fields (#19813) 2025-09-12 20:53:14 +02:00
Niels Dossche
4974d5ef49 Fix GH-19701: Serialize/deserialize loses some data
See GH-19701 for discussion.
This now restores the (correct) serialization output from versions
PHP 7.4.1 and below.

Closes GH-19762.
2025-09-11 21:01:34 +02:00
Niels Dossche
2ad0b5cf05 Fix GH-19792: SCCP causes UAF for return value if both warning and exception are triggered
If an exception _and_ a warning (or deprecation) is emitted, then the
result is destroyed twice. Use an `else if` to prevent this.
This is tested via zend_test because the deprecation that triggered the
original reproducer may disappear in the future.

Closes GH-19793.
2025-09-11 19:35:53 +02:00
Ilija Tovilo
d30ec1df2a Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Add --enable-zend-max-execution-timers to variation nightly build
2025-09-11 15:00:16 +02:00
Ilija Tovilo
78dd5cefd0 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Add --enable-zend-max-execution-timers to variation nightly build
2025-09-11 15:00:08 +02:00
Ilija Tovilo
be5b2bf4b8 [skip ci] Add --enable-zend-max-execution-timers to variation nightly build
Only enable for 8.3 because of GH-19786.
2025-09-11 14:59:39 +02:00
Appla
ed9430a5d1 Fix hard_timeout when zend-max-execution-timers is enabled
Closes GH-19786
2025-09-11 14:49:19 +02:00
Niels Dossche
901f71e6e3 Fix GH-19688: Remove pattern overflow in zip addGlob()
memcmp() can overread the filename if the filename is shorter than the
pattern.

Closes GH-19689.
2025-09-10 23:47:52 +02:00
Niels Dossche
f6f17484ab Fix GH-12265: Cloning an object breaks serialization recursion
Closes GH-12287.
2025-09-10 17:53:34 +02:00
Jakub Zelenka
c9cc68b9ed PHP-8.3 is now for PHP-8.3.27-dev 2025-09-09 23:02:24 +02:00
Jakub Zelenka
3a17712269 Merge branch 'PHP-8.2' into PHP-8.3 2025-09-09 21:59:35 +02:00
Jakub Zelenka
6f92e9c054 Merge branch 'PHP-8.1' into PHP-8.2 2025-09-09 21:58:37 +02:00
Jakub Zelenka
c0f8bb6622 Revert "fix pipe detection for STDERR."
This reverts commit a757f276f9.
2025-09-09 21:57:54 +02:00
Tim Düsterhus
4b35b8b69b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  fix pipe detection for STDERR.
  fix pipe detection for STDERR.
2025-09-09 19:42:05 +02:00
Tim Düsterhus
4f59f371c2 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  fix pipe detection for STDERR.
2025-09-09 19:41:54 +02:00
Tim Düsterhus
215ebbb8d5 zend_API: Do not overwrite readonly properties in object_properties_load() (#19767)
Fixes php/php-src#19765.
2025-09-09 19:33:45 +02:00
Remi Collet
d2fa1ca600 Mark test as ONLINE (#19776) 2025-09-09 16:34:02 +02:00
Alexandre Daubois
9eedf00206 Fix intl tests naming (#19763) 2025-09-09 08:41:20 +02:00