1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 14:31:06 +02:00
Commit Graph

129506 Commits

Author SHA1 Message Date
Dmitry Stogov
4b884bedc8 JIT: Fix missing type store
Fixes oss-fuzz #50653
2022-08-29 14:36:16 +03:00
Christoph M. Becker
48d2578d41 Merge branch 'PHP-8.1'
* PHP-8.1:
  Revert "Fix GH-9296: `ksort` behaves incorrectly on arrays with mixed keys"
2022-08-29 12:44:49 +02:00
Christoph M. Becker
800df0feac Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Revert "Fix GH-9296: `ksort` behaves incorrectly on arrays with mixed keys"
2022-08-29 12:43:25 +02:00
Christoph M. Becker
725cb4e8ad Revert "Fix GH-9296: ksort behaves incorrectly on arrays with mixed keys"
This reverts commit cd1aed8edd, as
discussed on internals (<https://externals.io/message/118483>).
2022-08-29 12:41:36 +02:00
Bob Weinand
8fe1db2089 Delay fiber VM stack cleanup until after observer has been called
Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2022-08-29 12:17:12 +02:00
Dmitry Stogov
2f9bc6e37a Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix ext/opcache/tests/jit/inc_obj_004.phpt failure introduced by fd74ee7e90
2022-08-29 12:36:06 +03:00
Dmitry Stogov
a516e2992d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix ext/opcache/tests/jit/inc_obj_004.phpt failure introduced by fd74ee7e90
2022-08-29 12:35:46 +03:00
Dmitry Stogov
ce42dcf483 Fix ext/opcache/tests/jit/inc_obj_004.phpt failure introduced by fd74ee7e90
This should fix GH-9445
2022-08-29 12:30:14 +03:00
David Carlier
b836007483 Merge branch 'PHP-8.1' 2022-08-28 23:35:46 +01:00
David Carlier
819df032aa Merge branch 'PHP-8.0' into PHP-8.1 2022-08-28 23:33:17 +01:00
David Carlier
e2a5428ca0 FPM fix strict prototype warnings.
Closes GH-8986.
2022-08-28 23:24:23 +01:00
Mikhail Galanin
335979fe1b Add a bit verbosity in FPM logs 2022-08-28 22:35:10 +01:00
Markus Staab
386a044748 [ci skip] Fix typo (requst → request)
Closes GH-9443.
2022-08-28 15:29:52 +02:00
Jakub Zelenka
5e9af0d0b0 Update NEWS for CLI built-in server changes 2022-08-28 13:34:06 +01:00
Vedran Miletić
7065a222b7 Respond with HTTP status 405 to DELETE/PUT/PATCH request on a static resource
Co-authored-by: Marin Martuslović <marin.martuslovic@student.uniri.hr>
2022-08-28 13:26:30 +01:00
Vedran Miletić
4f509058a9 Respond without body to HEAD request on a static resource
Co-authored-by: Marin Martuslović <marin.martuslovic@student.uniri.hr>
2022-08-28 13:26:30 +01:00
Christoph M. Becker
ca011bbf56 Drop unsupported libxml2 2.10.0 symbols
The Docbook parser module has been removed completely.  Support for
XPointer locations (ranges and points) is disabled by default, and will
eventually be removed completely.  Given that the maintainer comments
on the latter: "Be warned that this part of the code base is buggy and
had many security issues in the past", it seems to be prudent to no
longer build with XPointer locations support right away.

To be able to build against libxml2 2.10.0, we remove the export
definitions for Windows.

Closes GH-9358.
2022-08-28 13:56:34 +02:00
Tim Starling
11796229f2 Add libxml_get_external_entity_loader()
Add libxml_get_external_entity_loader(), which returns the currently
installed external entity loader, i.e. the value which was passed to
libxml_set_external_entity_loader() or null if no loader was installed
and the default entity loader will be used.

This allows libraries to save and restore the loader, controlling entity
expansion without interfering with the rest of the application.

Add macro Z_PARAM_FUNC_OR_NULL_WITH_ZVAL(). This allows us to get the
zval for a callable parameter without duplicating callable argument
parsing.

The saved zval keeps the object needed for fcc/fci alive, simplifying
memory management.

Fixes #76763.
2022-08-28 12:47:20 +01:00
Jakub Zelenka
35e2a25d83 Add openssl_cipher_key_length function
This function works in exactly the same way as openssl_cipher_iv_length
but for a key length. This is especially useful to make sure that the
right key length is provided to openssl_encrypt and openssl_decrypt.

In addtion the change also updates implementation of
openssl_cipher_iv_length and adds a test for it.
2022-08-28 12:27:16 +01:00
Jakub Zelenka
39b2380c34 [ci skip] Add note about chacha20-poly1305 additon to UPGRADING 2022-08-28 12:26:37 +01:00
Jakub Zelenka
1407968891 Implement FR #76935: OpenSSL chacha20-poly1305 AEAD support
This adds support for ChaCha20-Poly1305 AEAD algorithm so it is possible
to use it in the same way as AES GCM and other AEAD algorithms. This is
available in OpenSSL 1.1.0+.
2022-08-28 12:15:58 +01:00
Jakub Zelenka
505e8d2a04 Fix GH-9310: SSL local_cert and local_pk do not respect open_basedir restriction 2022-08-28 12:11:14 +01:00
Máté Kocsis
b4ec3e9bc0 Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
Christoph M. Becker
291c8bd8fc Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix pdo_dblib ext test conflicts when run in parallel
2022-08-26 14:59:59 +02:00
Christoph M. Becker
2bd58dbcc4 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix pdo_dblib ext test conflicts when run in parallel
2022-08-26 14:59:08 +02:00
Michael Voříšek
f86629569c Fix pdo_dblib ext test conflicts when run in parallel
Closes GH-9430.
2022-08-26 14:57:13 +02:00
Máté Kocsis
ef72d53397 Declare ext/standard constants in stubs - part 3 (#9427) 2022-08-26 14:47:34 +02:00
Máté Kocsis
c573b8228a Declare ext/standard constants in stubs - part 2 (#9426) 2022-08-26 14:40:48 +02:00
Christoph M. Becker
c643cbf388 Support test-ini also for phpize builds
Automatically generating and using test INI files is supported for
in-tree build (`buildconf`) for a long time, and this can make sense
for phpize builds too, especially when the build extension is a zend
extension, so it can be properly loaded.

Thus we make `--enable-test-ini` and `--with-test-ini-ext-exclude`
available for phpize, but default to false for full BC.

Closes GH-8787.
2022-08-26 14:25:10 +02:00
Ilija Tovilo
3264f2367d Fix strict-prototypes warning 2022-08-26 13:57:39 +02:00
Máté Kocsis
3f04caab28 Merge branch 'PHP-8.1'
* PHP-8.0:
  Fix GH-8348 for nightly
2022-08-26 10:58:09 +02:00
Máté Kocsis
ce1358f9b0 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8348 for nightly
2022-08-26 10:57:38 +02:00
Michael Voříšek
34d9e089c2 Fix GH-8348 for nightly 2022-08-26 10:56:58 +02:00
Dmitry Stogov
7f74a30018 Reduce observer overhead when restoring script from opcache (#9413)
* Reduce observer overhead when restoring script from opcache

* typo

* Split loops to keep notifications in case of redeclaration errors
2022-08-25 19:49:16 +03:00
Christoph M. Becker
b485a3ec0b Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix oci8/pdo_oci random test failures when run in parallel
2022-08-25 15:22:52 +02:00
Christoph M. Becker
502c630d01 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix oci8/pdo_oci random test failures when run in parallel
2022-08-25 15:21:52 +02:00
Michael Voříšek
be4dd60c55 Fix oci8/pdo_oci random test failures when run in parallel
Closes GH-9424.
2022-08-25 15:20:50 +02:00
Christoph M. Becker
145525bc4c Merge branch 'PHP-8.1'
* PHP-8.1:
  xmlRelaxNGCleanupTypes() is deprecated as of libxml2 2.10.0
2022-08-25 15:12:40 +02:00
Christoph M. Becker
afc5ab4531 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  xmlRelaxNGCleanupTypes() is deprecated as of libxml2 2.10.0
2022-08-25 15:11:41 +02:00
Christoph M. Becker
f59754694e xmlRelaxNGCleanupTypes() is deprecated as of libxml2 2.10.0
The documentation[1] suggest to call `xmlCleanupParser()` instead, but
we are not doing that for reasons[2].  Thus, we do no longer call
`xmlRelaxNGCleanupTypes()` for libxml2 ≥ 2.10.0.

[1] <https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-relaxng.html#xmlRelaxNGCleanupTypes>
[2] <8742276eb3>

Closes GH-9417.
2022-08-25 15:10:30 +02:00
Tim Düsterhus
cbb024cb3d Select rand_rangeXX() variant only based on the requested range (#9418)
This fixes an incompatibility when wrapping native 32-bit engines with a userland
engine. The latter always used the 64-bit range function which then used two
32-bit numbers from the underlying engine to fill the 64-bit range, whereas the
native implementation used only one.

Now the selection of the range variant only depends on the requested range. A
32-bit range uses the 32-bit variant (even for 64-bit engines), whereas a
larger range uses the 64-bit variant.

This was found in https://github.com/php/php-src/pull/9410#discussion_r953213000
2022-08-25 09:42:32 +02:00
Máté Kocsis
de90edc42c Declare ext/oci8 constants in stubs (#9419)
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-08-24 21:10:20 +02:00
David CARLIER
e787d9a0dc GH-9370: Fix opcache jit protection bits.
Allow mprotect to occur, pthread_jit_write_np are just to allow mprotect
 flags to be used.

Closes #9371.
2022-08-24 16:11:35 +01:00
Máté Kocsis
92c8e79673 Merge branch 'PHP-8.1'
* PHP-8.0:
  Test oci8 & pdo_oci in CI
2022-08-24 16:47:17 +02:00
Máté Kocsis
497820ea5f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Test oci8 & pdo_oci in CI
2022-08-24 16:46:38 +02:00
Michael Voříšek
c19116ff09 Test oci8 & pdo_oci in CI
Closes GH-8348
2022-08-24 16:45:34 +02:00
Máté Kocsis
bc4c012611 Declare ext/standard constants in stubs - part 1 (#9404) 2022-08-24 16:09:48 +02:00
Máté Kocsis
10a27bc47b Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix pdo_oci tests for PHP 8.1
2022-08-24 14:40:01 +02:00
Michael Voříšek
2db2cab6ad Fix pdo_oci tests for PHP 8.1
Closes GH-9051
2022-08-24 14:39:45 +02:00
Tim Düsterhus
0f696e2934 Fix rand_range32() for umax = UINT32_MAX (#9416)
* Fix rand_range32() for umax = UINT32_MAX

This was introduced in the commit that added the random extension:
4d8dd8d258.

Resolves GH-9415

* [ci skip] Rename `$r` to `$randomizer` in gh9415.phpt

* Make gh9415.phpt deterministic

* Make gh9415.phpt compatible with 32-bit
2022-08-24 14:25:51 +02:00