1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00
Commit Graph

130508 Commits

Author SHA1 Message Date
ndossche f592f75e9c Add missing error check on tidyLoadConfig
Parse errors were not reported for the default config, they were only
reported when explicitly another config was loaded.
This means that users may not be aware of errors in their configuration
and therefore the behaviour of Tidy might not be what they intended.
This patch fixes that issue by using a common function. In fact, the
check for -1 might be enough for the current implementation of Tidy, but
the Tidy docs say that any value other than 0 indicates an error.
So future errors might not be caught when just using an error code of -1.
Therefore, this also changes the error code checks of == -1 to < 0 and
== 1 to > 0.

Closes GH-10636

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-02-21 14:12:17 +00:00
George Peter Banyard f6ec807871 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  ext/curl/interface: fix zend_result return value
  Zend/zend_ini: fix zend_result return values
2023-02-21 13:53:48 +00:00
Max Kellermann ed4dc39e7f ext/curl/interface: fix zend_result return value
Closes GH-10640

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-02-21 13:41:07 +00:00
Max Kellermann d51eb1d74c Zend/zend_ini: fix zend_result return values
The value "1" was illegal.

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-02-21 13:40:54 +00:00
Dmitry Stogov 240c120cbc Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10635: ARM64 function JIT causes impossible assertion (#10638)
2023-02-21 09:26:10 +03:00
Dmitry Stogov 70ff10af72 Fix GH-10635: ARM64 function JIT causes impossible assertion (#10638) 2023-02-21 09:25:51 +03:00
Dmitry Stogov 388d784154 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix (at lease part of the) #GH-10635: ARM64 function JIT causes impossible assertion
2023-02-20 19:44:22 +03:00
Dmitry Stogov 08e7591206 Fix (at lease part of the) #GH-10635: ARM64 function JIT causes impossible assertion 2023-02-20 19:42:35 +03:00
George Peter Banyard 73f9ffc5cd Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10627: mb_convert_encoding crashes PHP on Windows
  ext/mbstring: fix new_value length check
2023-02-20 13:41:11 +00:00
Niels Dossche ed0c0df351 Fix GH-10627: mb_convert_encoding crashes PHP on Windows
Fixes GH-10627

The php_mb_convert_encoding() function can return NULL on error, but
this case was not handled, which led to a NULL pointer dereference and
hence a crash.

Closes GH-10628

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-02-20 13:33:11 +00:00
Max Kellermann 243865ae57 ext/mbstring: fix new_value length check
Commit 8bbd0952e5 added a check rejecting empty strings; in the
merge commiot 379d9a1cfc however it was changed to a NULL check,
one that did not make sense because ZSTR_VAL() is guaranteed to never
be NULL; the length check was accidently removed by that merge commit.

This bug was found by GCC's -Waddress warning:

 ext/mbstring/mbstring.c:748:27: warning: the comparison will always evaluate as ‘true’ for the address of ‘val’ will never be NULL [-Waddress]
   748 |         if (!new_value || !ZSTR_VAL(new_value)) {
       |                           ^

Closes GH-10532

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-02-20 13:32:56 +00:00
David Carlier 25fb7a2e8a [ci skip] NEWS 2023-02-19 22:48:39 +00:00
David Carlier 2f4ba1b1fb Merge branch 'PHP-8.1' into PHP-8.2 2023-02-19 20:30:59 +00:00
Niels Dossche ae16471628 Fix GH-10623: ReflectionFunction::getClosureUsedVariables() returns empty array in presence of variadic arguments
The code was missing the handling for the RECV_VARIADIC instruction.
Additional regression test for GH-10623

Co-authored-by: Fabio Ivona <fabio.ivona@defstudio.it>
2023-02-19 20:18:28 +00:00
Tim Düsterhus 7d229787b0 makedist: Use fixed owner/group in generated tarball (#10613)
This reduces the amount of system-dependent data within the tarball and makes
it more reproducible. Instead of the information of the release manager that
generates the tarball, the tarball will include the fixed 0:0 value as
owner:group.
2023-02-18 11:17:08 +01:00
Jakub Zelenka a7d57e242e Merge branch 'PHP-8.1' into PHP-8.2 2023-02-17 16:38:53 +00:00
Jakub Zelenka a9e4f51844 Update NEWS with scanner and parser build fixes 2023-02-17 16:37:14 +00:00
Jakub Zelenka 4f731fa2ec Fix php_json_scanner_defs.h target in ext/json/Makefile.frag 2023-02-17 16:37:14 +00:00
Daniel Black 2b3fa5edac zend win32 RE2C header files to Make targets and generated_files
like zend_ini_parser.h, list zend_ini_scanner_defs.h and
zend_language_scanner_defs.h.

Add all these files to generated_files so they don't get missed.
2023-02-17 16:37:14 +00:00
Daniel Black e83cda0887 ext/Zend: zend_language_scanner_defs.h as make target 2023-02-17 16:37:13 +00:00
Daniel Black 2fde3afffb ext/json: add php_json_scanner_defs.h as make target
To prevent build failures like:

make: *** No rule to make target '/code/master/ext/json/php_json_scanner_defs.h', needed by 'ext/json/json_scanner.lo'.  Stop.
2023-02-17 16:37:13 +00:00
Ilija Tovilo eed0fb925f Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Skip slow tidy test on asan
2023-02-17 14:56:53 +01:00
Ilija Tovilo 52c96f21be [skip ci] Skip slow tidy test on asan 2023-02-17 14:56:28 +01:00
Jakub Zelenka a4fe8f7e9f Merge branch 'PHP-8.1' into PHP-8.2 2023-02-17 13:21:56 +00:00
Jakub Zelenka fd3cc17cbd Add max_multipart_body_parts info into php.ini files 2023-02-17 13:21:18 +00:00
Ilija Tovilo 81f3fcd5cc Revert "Remove useless UNEXPECTED around RETURN_VALUE_USED in specialized RETVAL handler"
This reverts commit 5b801612cb.
2023-02-17 00:28:33 +01:00
Ilija Tovilo efb9181a98 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Revert "Fix GH-10168: heap-buffer-overflow at zval_undefined_cv"
2023-02-16 14:13:17 +01:00
Ilija Tovilo 7b68ff46da Revert "Fix GH-10168: heap-buffer-overflow at zval_undefined_cv"
This reverts commit 71ddede565.
2023-02-16 14:07:17 +01:00
Ben Ramsey c9ce25c800 Merge branch 'PHP-8.1' into PHP-8.2 2023-02-14 14:13:30 -06:00
Ben Ramsey d9ac59b0a9 Ensure tar is not bsdtar 2023-02-14 14:13:01 -06:00
Ben Ramsey 1d2e6cb016 Merge branch 'PHP-8.1' into PHP-8.2 2023-02-14 13:49:49 -06:00
Ben Ramsey 843ba82b53 Use gtar if it's in the PATH 2023-02-14 13:49:02 -06:00
Ben Ramsey 586e81b259 Point to the issue tracker on GitHub 2023-02-14 13:49:02 -06:00
Tim Düsterhus a313cce913 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS (#10586)
  [ci skip] Next release will be 8.0.29
2023-02-14 20:28:27 +01:00
Tim Düsterhus 5e69d76bbc Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  [ci skip] Next release will be 8.0.29
2023-02-14 20:27:53 +01:00
Niels Dossche e35e6dc351 [ci skip] NEWS (#10586) 2023-02-14 20:27:29 +01:00
Pierrick Charron dc054488da PHP-8.2 is now for PHP 8.2.4-dev 2023-02-14 10:02:46 -05:00
Gabriel Caruso 0e45ed772d [ci skip] Next release will be 8.0.29 2023-02-14 15:19:11 +01:00
Remi Collet 73b3f78ea0 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  more config for new FPM tests
2023-02-14 14:14:34 +01:00
Remi Collet b11d855dbf Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  more config for new FPM tests
2023-02-14 14:14:03 +01:00
Remi Collet e86d8704b4 more config for new FPM tests 2023-02-14 14:13:40 +01:00
Jakub Zelenka cbf089018b Merge branch 'PHP-8.1' into PHP-8.2 2023-02-14 11:00:20 +00:00
Jakub Zelenka 4058d20608 Merge branch 'PHP-8.0' into PHP-8.1 2023-02-14 10:52:17 +00:00
Jakub Zelenka 937b1e38e2 Fix missing colon in NEWS 2023-02-14 10:46:48 +00:00
Jakub Zelenka eef29d434a Change NEWS for GHSA-54hq-v5wp-fqgv as it is for all SAPIs 2023-02-14 10:42:40 +00:00
Jakub Zelenka caaaf75990 Fix incorrect character in NEWS 2023-02-14 10:33:56 +00:00
Jakub Zelenka 054c7b09f9 Update NEWS 2023-02-14 10:23:59 +00:00
Jakub Zelenka 716de0cff5 Introduce max_multipart_body_parts INI
This fixes GHSA-54hq-v5wp-fqgv DOS vulnerabality by limitting number of
parsed multipart body parts as currently all parts were always parsed.
2023-02-14 10:21:23 +00:00
Jakub Zelenka e45850c195 Fix repeated warning for file uploads limit exceeding 2023-02-14 10:21:07 +00:00
Dmitry Stogov e3aa73904a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix updating SSA object type for *_ASSIGN_OP (#10458)
2023-02-14 11:29:47 +03:00