1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

127988 Commits

Author SHA1 Message Date
Nikita Popov 414f7fc2bb Merge branch 'PHP-8.1'
* PHP-8.1:
  Improve type narrowing fix
2022-04-10 11:22:52 +02:00
Nikita Popov c72e9621ce Improve type narrowing fix
We need to explicitly model the null return type for property
accesses on non-objects.
2022-04-10 11:22:36 +02:00
Nikita Popov 8e58828e89 Add debug assertion on type narrowing
This ensures that this will show up as a fuzzing failure.
2022-04-10 10:45:52 +02:00
Nikita Popov d5c854d89a Merge branch 'PHP-8.1'
* PHP-8.1:
  Improve file/line information for narrowing warning
2022-04-10 10:42:11 +02:00
Nikita Popov 323f3c6914 Improve file/line information for narrowing warning
Report the file/line of the opline rather than the include location.

This should make issues like #8251 easier to debug.
2022-04-10 10:41:20 +02:00
Ilija Tovilo eb97b09ac5 Merge branch 'PHP-8.1'
* PHP-8.1:
  Remove issue_comment trigger on nightly
2022-04-10 01:11:41 +02:00
Ilija Tovilo 3b4d33a8fa Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Remove issue_comment trigger on nightly
2022-04-10 01:11:24 +02:00
Ilija Tovilo 9af3759987 Remove issue_comment trigger on nightly
This was a left-over from the attept to trigger nightly via comment.
2022-04-10 01:10:25 +02:00
Ilija Tovilo 0d017f7462 Merge branch 'PHP-8.1'
* PHP-8.1:
  Add nightly for GitHub actions
2022-04-09 17:13:19 +02:00
Ilija Tovilo 490c4234e0 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Add nightly for GitHub actions
2022-04-09 17:13:01 +02:00
Ilija Tovilo 5de1cd9e48 Add nightly for GitHub actions 2022-04-09 17:08:18 +02:00
George Peter Banyard 2ac5948f5c Refactor SplFileObject CSV methods (#8317)
Use early returns, which fixes ValueError order of arguments and flattens the code
2022-04-08 20:16:26 +01:00
George Peter Banyard 3931d726c4 Add missing ZPP checks in SPL Directory (#8325)
Co-authored-by: Máté Kocsis <kocsismate@woohoolabs.com>
2022-04-08 17:58:10 +01:00
George Peter Banyard 6039c07a3a Allow `null and false` as standalone types (#7546)
RFC: https://wiki.php.net/rfc/null-standalone-type

Also a drive-by consistency fix for error messages.
2022-04-08 17:23:52 +01:00
David Carlier 7bb2a9ff38 Add extra check for FPM proc dumpable on SELinux based systems
The deny_ptrace is a OS runtime setting and is off by default,
at least on workstations flavors (fedora) however it might be
different on production servers.
2022-04-08 17:07:58 +01:00
Ilija Tovilo cdf7240f75 [skip ci] Remove superfluous backslash in UPGRADING 2022-04-08 11:00:28 +02:00
Arnaud Le Blanc 72fb511d0c Stop including php_pcre.h from spl_iterators.h
This fixes GH-7774.

spl_iterators.h was including php_pcre.h so that one object intern struct could
reference a pcre_cache_entry. These object interns should not be public, so they
can be moved out of the header file.

This change moves the object interns ouf of spl_iterators.h so that php_pcre.h
doesn't need to be included from there.
2022-04-08 10:37:12 +02:00
Tim Düsterhus 9085197734 Implement the "Redacting parameters in back traces" RFC
https://wiki.php.net/rfc/redact_parameters_in_back_traces
2022-04-08 10:36:16 +02:00
Levi Morrison c68591fa16 Use AS_ECHO([]) instead of obsolete $as_echo (#8321) 2022-04-07 21:49:24 +01:00
Christoph M. Becker 1a3b85cc64 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-8267: MySQLi uses unsupported format specifier on Windows
2022-04-07 17:07:00 +02:00
Christoph M. Becker 22f8886038 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8267: MySQLi uses unsupported format specifier on Windows
2022-04-07 17:06:20 +02:00
Christoph M. Becker 7c702b72f2 Fix GH-8267: MySQLi uses unsupported format specifier on Windows
Instead of using the unsupported `%I64u` and `%I64d` format specifiers
on Windows, we use the portable `PRIu64` and `PRId64` specifiers.

The `L64()` macro and the `my_longlong` typedef should be adapted as
well, as the `i64` literal suffix is still supported by MSVC, but using
`LL` or `ll` is recommended[1], and the standard `int64_t` is available
there anyway.  This is not urgent, though.

[1] <https://docs.microsoft.com/en-us/cpp/cpp/numeric-boolean-and-pointer-literals-cpp?view=msvc-170#integer-literals>

Closes GH-8268.
2022-04-07 17:03:15 +02:00
George Peter Banyard 892270608c Minor refactoring of spl_directory.c
Using more appropriate types
Fix comments
Early returns
2022-04-07 15:12:40 +01:00
Christoph M. Becker 6828f9d1af Fix newly introduced test
We need to tell the test runner that ext/curl is required to run the
test.
2022-04-07 11:59:29 +02:00
Derick Rethans a4f4b96c91 Updated to version 2022.1 (2022a) 2022-04-07 10:45:21 +01:00
Derick Rethans d73b7b838e Empty merge 2022-04-07 10:45:21 +01:00
Derick Rethans 7e829d1536 Updated to version 2022.1 (2022a) 2022-04-07 10:45:20 +01:00
Derick Rethans 5e57cf9691 Empty merge 2022-04-07 10:45:20 +01:00
Derick Rethans 7aefee1613 Updated to version 2022.1 (2022a) 2022-04-07 10:45:19 +01:00
Derick Rethans 9efaf3c54b Empty merge 2022-04-07 10:45:19 +01:00
Derick Rethans 341bea37e8 Updated to version 2022.1 (2022a) 2022-04-07 10:45:17 +01:00
Derick Rethans 553dd5d560 Merge branch 'bug51634-curl-postfields-multi-value' 2022-04-07 10:01:41 +01:00
Derick Rethans 8093ed6168 Implemented FR #51634: Can't post multiple fields with the same name
This PR allows for multiple values with the same field name to be sent to an
HTTP server. This server can't be PHP, because PHP's POST processing does not
allow for two the same field names. But sending multiple fields with the same
name is required for some operations by RFC 7578.

This PR allows you to attach an array of values to a field name, and each of
these will then be sent as its own distinct multipart/form-data field.
2022-04-07 10:01:31 +01:00
Christoph M. Becker 4117063824 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-8310: Registry settings are no longer recognized
2022-04-06 17:34:43 +02:00
Christoph M. Becker 1bd9890b20 Fix GH-8310: Registry settings are no longer recognized
`zend_file_handle->filename` is a `zend_string*` pointer now, so we
must not cast to `char*` but rather pass the underlying `char*`.

Closes GH-8313.
2022-04-06 17:33:30 +02:00
Christoph M. Becker d03a94a0a6 Use proper types in sodium_crypto_stream_xchacha20_xor_ic()
Most importantly, `ic` needs to be of type `zend_long`, not `zend_long*`.

Closes GH-8302.
2022-04-05 16:34:12 +02:00
George Peter Banyard 2fe35cf807 Regenerate optimized func infos
Using the --generate-optimizer-info option for ./build/gen_stubs.php
2022-04-05 13:36:14 +01:00
Christoph M. Becker 012ef7912a Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix #81714: segfault when serializing finalized HashContext
2022-04-05 13:36:50 +02:00
Christoph M. Becker 187f5a362d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #81714: segfault when serializing finalized HashContext
2022-04-05 13:36:07 +02:00
Christoph M. Becker c2eafc29f5 Fix #81714: segfault when serializing finalized HashContext
We must not allow to serialize already finalized `HashContext`s, since
the internal context is already freed.  Since there is not much point
in serializing finalized `HashContext`s, we just bail out in that case.

Closes GH-8265.
2022-04-05 13:25:22 +02:00
Máté Kocsis ee34c298f0 Merge branch 'PHP-8.1'
* PHP-8.1:
  Mark ext/mysqli properties as readonly for documentation purposes
2022-04-05 13:24:51 +02:00
Máté Kocsis 2b4fee03af Mark ext/mysqli properties as readonly for documentation purposes 2022-04-05 13:24:21 +02:00
Christoph M. Becker 22c80e48bb Merge branch 'PHP-8.1'
* PHP-8.1:
  Bump version
  JIT: Fix array clobbering by user error handler
2022-04-05 13:21:32 +02:00
Christoph M. Becker 60fdca5419 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Bump version
2022-04-05 13:20:19 +02:00
Christoph M. Becker 43f3745abb Bump version
Apparently, this has been forgotten when PHP 8.0.17RC1 and 8.0.18RC1
had been tagged.

We also fix the version of the fix for GH-8253, which didn't make it
into PHP 8.0.18RC1.
2022-04-05 13:19:02 +02:00
Dmitry Stogov df0c8aaee9 JIT: Fix array clobbering by user error handler
Fixes oss-fuzz #46336
2022-04-04 16:47:47 +03:00
Paragon Initiative Enterprises afd8f84c1a Add sodium_crypto_stream_xchacha20_xor_ic()
There are many use-cases where a PHP user is currently using sodium_compat's implementation of this low-level XChaCha20 API. For example, multi-part message processing (in low-memory settings) for a ciphertext that was encrypted with XChaCha20-Poly1305 (rather than the secretstream API).

Adding this function to ext/sodium offers better performance and lowers users' memory usage with the polyfill, and ensures that users coming from other languages that provide libsodium bindings have a more consistent experience with our bindings. This is a win-win.

This patch follows the libsodium precedent of adding functions instead of optional parameters to existing functions. The parameter order is also consistent with the C API.

https://doc.libsodium.org/advanced/stream_ciphers/xchacha20#usage

Closes GH-8276.
2022-04-04 15:43:42 +02:00
Dmitry Stogov 4f18dbeb97 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix array clobbering by user error handler
2022-04-04 16:37:17 +03:00
Dmitry Stogov c489e360a6 JIT: Fix array clobbering by user error handler
Fixes oss-fuzz #46336
2022-04-04 16:36:25 +03:00
Dmitry Stogov d260e063a8 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fixed reference counting inference
2022-04-04 15:34:57 +03:00