1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00
Commit Graph

133989 Commits

Author SHA1 Message Date
Ilija Tovilo a8d575ecef Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Mark problematic openssl tests as xfail for now
2024-03-08 19:09:27 +01:00
Ilija Tovilo 932982f867 [skip ci] Mark problematic openssl tests as xfail for now 2024-03-08 19:09:14 +01:00
Niels Dossche 3fba242124 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS
  Fix GH-13612: Corrupted memory in destructor with weak references
2024-03-08 18:27:10 +01:00
Niels Dossche 608ef99a65 [ci skip] NEWS 2024-03-08 18:26:36 +01:00
Niels Dossche 39b8d5c871 Fix GH-13612: Corrupted memory in destructor with weak references
Inside `zend_object_std_dtor` the weakrefs are notified after the destruction
of properties already took place. In this test case, the destructor of an anon
class will be invoked due to the property destruction. That class has a
weak reference to its parent. This means that the destructor can access
parent properties that already have been destroyed, resulting in a UAF.
Fix this by notifying the weakrefs at the start of the object's
destruction.

Closes GH-13613.
2024-03-08 18:26:17 +01:00
Peter Kokot 88e90c6f83 Move CODEOWNERS to .github (#13591)
The CODEOWNERS file is specific to GitHub interface and can be located
in .github, docs or in project root. It makes the php-src root directory
a bit more browseable.
2024-03-07 22:44:31 +01:00
David Carlier 93d89cb80d Merge branch 'PHP-8.2' into PHP-8.3 2024-03-06 11:39:37 +00:00
David Carlier e3f0d03452 Fix GH-13603 ext/sockets: properly initialised address info data.
Led to random characters visible on socket id on macOs.

Close GH-13606
2024-03-06 11:37:48 +00:00
David Carlier 487f24898b Merge branch 'PHP-8.2' into PHP-8.3 2024-03-05 18:39:46 +00:00
David Carlier 33967aef11 ext/gettext: dcgettext/dcngettext fix for stable branches.
close GH-13594
2024-03-05 18:39:14 +00:00
Arnaud Le Blanc e220e84b36 [ci skip] 2024-03-05 12:19:59 +01:00
Arnaud Le Blanc 6b57e2d988 Fix GH-13569: GC buffer unnecessarily grows up to GC_MAX_BUF_SIZE when scanning WeakMaps 2024-03-05 12:17:21 +01:00
Remi Collet 6a3c083200 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13217 Test failure with zlib-ng
2024-03-05 10:13:40 +01:00
Remi Collet 5e12844d4d Fix GH-13217 Test failure with zlib-ng
As compressed result may be different
- drop or relax expectations on compressed data
- rely on uncompressed result of compressed data
2024-03-05 10:13:22 +01:00
David Carlier eef44d2291 Merge branch 'PHP-8.2' into PHP-8.3 2024-03-04 15:35:21 +00:00
David Carlier 9999a0cb75 ext/gettext: dcgettext/dcngettext sigabrt on macOs.
the man page states `the locale facet is determined by the category argument,  which  should  be
 one of the LC_xxx constants defined in the <locale.h> header, excluding LC_ALL`,
since the 0.22.5 release, sanity checks had been strenghtened leading to
an abort with the Zend/tests/arginfo_zpp_mismatch.phpt test setting the
category to 0 which is LC_ALL on macOs.

close GH-13555
2024-03-04 15:34:59 +00:00
Saki Takamachi 23d89e3851 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed handshake response charset. (#13470)
  [skip ci] Fixed NEWS
2024-03-04 21:57:56 +09:00
Saki Takamachi 72779e6d64 NEWS 2024-03-04 21:53:48 +09:00
Saki Takamachi 7466f9c99c Fixed handshake response charset. (#13470)
The character set ID included in the handshake data at the time of connection
actually only includes the lower 8 bits of the ID, so if  try to use this to specify
a character set, the corresponding character set may not exist.

In case of an invalid character set, the default character set is now used
without an error.

Fixes #13452
Closes #13470
2024-03-04 21:53:48 +09:00
Saki Takamachi 29a39eb782 Fixed handshake response charset. (#13470)
The character set ID included in the handshake data at the time of connection
actually only includes the lower 8 bits of the ID, so if  try to use this to specify
a character set, the corresponding character set may not exist.

In case of an invalid character set, the default character set is now used
without an error.

Fixes #13452
Closes #13470
2024-03-04 21:51:02 +09:00
Saki Takamachi 6bcce681ef [skip ci] Fixed NEWS 2024-03-04 21:50:37 +09:00
Saki Takamachi 04eeaa0bc7 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Added validation of `\n` in $additional_headers of mail()
2024-03-04 21:30:27 +09:00
Saki Takamachi 04e8e55f47 Added validation of \n in $additional_headers of mail()
When $additional_headers of mail() is an array, the same validation as
`\r\n` is now applied to `\n` alone too.
2024-03-04 21:30:07 +09:00
Niels Dossche dfd37c7175 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-11808: Live filesystem modified by tests (security)
2024-03-01 18:46:30 +01:00
Niels Dossche 7c8a3e426e Fix GH-11808: Live filesystem modified by tests (security)
There's a test that tries to make /etc world-writable, and asserts that
it fails. Although this test is guarded by a root user check, there are
situations where you don't need to be root to be able to do this.
This may thus have unwanted effects on your live filesystem.

The simple solution is to remove that part of the test. It doesn't
really add value anyway: we're trying to test the chmod error path, but
that exact same error path can be reached with any failure condition
that the kernel gives. For example, trying to chmod a non-existent file
will trigger the same code path.

While at it, also prefix the test path for the non-existent file such
that we don't accidentally modify the filesystem.

The chroot now has a better root-user check, that will not modify the
filesystem.

Other root-modifying mkdir tests were removed because they added no
value either.

Closes GH-13566.
2024-03-01 18:45:54 +01:00
Tim Düsterhus 8ce3478fdd Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] Fix version for GH-13544 in NEWS
2024-02-29 18:21:57 +01:00
Tim Düsterhus abfe5ffded [ci skip] Fix version for GH-13544 in NEWS
Apparently PHP 8.2.17 was branched off after creating the PR and before merging
it, placing the NEWS in the wrong location.
2024-02-29 18:21:03 +01:00
Tim Düsterhus e6c0b09e88 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  random: Fix unknown `mt_srand()` compatibility for unknown modes (#13544)
  Removed `REPORT_EXIT_STATUS=no` in libmysql tests
  Revert "Fix GH-13519: PGSQL_CONNECT_FORCE_RENEW with persistent connections." (#13546)
2024-02-29 18:10:39 +01:00
Tim Düsterhus e059498c04 random: Fix unknown mt_srand() compatibility for unknown modes (#13544)
PHP 8.1 and below interpreted unknown modes as `MT_RAND_MT19937`, but PHP 8.2+
interprets them as `MT_RAND_PHP`.

Align the behavior with PHP 8.1 and below, because folks should be steered
towards the standard mode.
2024-02-29 18:05:59 +01:00
Saki Takamachi 116166cd30 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Removed `REPORT_EXIT_STATUS=no` in libmysql tests
2024-02-29 08:49:04 +09:00
Saki Takamachi 99688dbe7a Removed REPORT_EXIT_STATUS=no in libmysql tests 2024-02-29 08:41:36 +09:00
Jakub Zelenka 47dca339a4 PHP-8.3 is now for PHP-8.3.5-dev 2024-02-28 11:46:49 +00:00
David CARLIER 07cbe3083a Revert "Fix GH-13519: PGSQL_CONNECT_FORCE_RENEW with persistent connections." (#13546)
This reverts commit b9a9790be0.
2024-02-27 23:17:17 +00:00
Jakub Zelenka 0306983fa4 Merge branch 'PHP-8.2' into PHP-8.3 2024-02-27 23:03:52 +00:00
Jakub Zelenka 330b26e04c Revert "Fix GH-13519: PGSQL_CONNECT_FORCE_RENEW with persistent connections."
This reverts commit b9a9790be0.
2024-02-27 23:03:28 +00:00
Niels Dossche 0285395126 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13531: Unable to resize SplfixedArray after being unserialized in PHP 8.2.15
2024-02-27 23:05:26 +01:00
Niels Dossche 8494058a1f Fix GH-13531: Unable to resize SplfixedArray after being unserialized in PHP 8.2.15
When unserializing, the cached_resize field was not reset to -1
correctly, causing the setSize() method to think we were inside of a
resize operation.

Closes GH-13543.
2024-02-27 23:04:23 +01:00
Jakub Zelenka 4dc8c08acd Merge branch 'PHP-8.2' into PHP-8.3 2024-02-27 22:04:05 +00:00
Jakub Zelenka 3d4b36fc9c CI: Continue on error if Caddy download fails
Closes GH-13542
2024-02-27 22:03:04 +00:00
Niels Dossche 8bb2a15d01 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13517: Multiple test failures when building with --with-expat
2024-02-27 21:49:39 +01:00
Niels Dossche 552ea62e1f Fix GH-13517: Multiple test failures when building with --with-expat
The reflection failure is because the XML extension is used to check the
module dependency information, but that extension can be configured to
not depend on ext/libxml, resulting in a different output. The solution
is to check another extension instead.

The test failures in ext/xml/tests are because of different behaviour
between libxml2 and Expat error handling. These are expected differences
and the solution is to split the tests.

Closes GH-13522.
2024-02-27 21:49:01 +01:00
Gina Peter Banyard ddebe469e1 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  ext/pdo: Fix various PDORow bugs
2024-02-27 15:31:48 +00:00
Gina Peter Banyard b4e272c56a ext/pdo: Fix various PDORow bugs
- Add tests
- NULL derefencing in read_dimension handler
- Fix isset()
- Fix empty() with column numbers as offsets
- Refactoring to use common functions
2024-02-27 15:30:23 +00:00
Sergey Panteleev 7e938d238f Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  PHP-8.2 is now for PHP 8.2.18-dev

# Conflicts:
#	Zend/zend.h
#	configure.ac
#	main/php_version.h
2024-02-27 17:27:51 +03:00
Sergey Panteleev e1a8ebd61b PHP-8.2 is now for PHP 8.2.18-dev 2024-02-27 17:26:44 +03:00
David Carlier 12f52365a5 Merge branch 'PHP-8.2' into PHP-8.3 2024-02-27 00:31:05 +00:00
David Carlier b9a9790be0 Fix GH-13519: PGSQL_CONNECT_FORCE_RENEW with persistent connections.
persistent connections did not take in account this flag, after the
usual link sanity checks, we remove its entry.

Close GH-13519
2024-02-27 00:30:48 +00:00
Niels Dossche c5a63a90fa Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix reference access in dimensions for DOMNodeList and DOMNodeMap
2024-02-26 19:44:39 +01:00
Niels Dossche b8a1041fd2 Fix reference access in dimensions for DOMNodeList and DOMNodeMap
Closes GH-13511.
2024-02-26 19:42:54 +01:00
Peter Kokot d20f82669d Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix detection of image formats in system gd library
2024-02-26 14:00:08 +01:00