Commit Graph

15067 Commits

Author SHA1 Message Date
Bob Weinand
88537c55b5 Merge branch 'PHP-8.2' into PHP-8.3 2023-11-25 01:01:56 +01:00
Bob Weinand
50ccea31f2 Merge branch 'PHP-8.1' into PHP-8.2 2023-11-25 00:59:26 +01:00
Bob Weinand
1305ea23ce Add NEWS entry for GH-12768 2023-11-25 00:57:22 +01:00
Derick Rethans
73246bac00 Update NEWS 2023-11-23 16:18:34 +00:00
Ilija Tovilo
daa38dd63e
Fix in-place modification of filename in php_message_handler_for_zend
php_strip_url_passwd modifies url in-place. We cannot assume from
php_message_handler_for_zend that data is a temporary, modifiable string.

Fixes oss-fuzz #64209
Closes GH-12733
2023-11-22 21:09:42 -06:00
Ilija Tovilo
1fdcfa4ebe
Fix use-after-free of name in var-var with malicious error handler
Fixes oss-fuzz #54325
Closes GH-12732
2023-11-22 21:08:55 -06:00
Jakub Zelenka
55e0748487
Fix #50713: openssl_pkcs7_verify() may ignore untrusted CAs
Closes GH-12499
2023-11-22 21:03:55 -06:00
Niels Dossche
243fa9c143
Fix GH-12616: DOM: Removing XMLNS namespace node results in invalid default: prefix
The namespace data is freed and set to NULL, but there remain references
to the namespace declaration nodes. This (rightfully) confuses libxml2
because its invariants are broken. We also have to remove all remaining
references from the subtree. This fixes the data corruption bug.

Closes GH-12681.
2023-11-22 20:39:30 -06:00
Niels Dossche
6a76e5d0a2
Fix GH-12702: libxml2 2.12.0 issue building from src
Fixes GH-12702.

Co-authored-by: nono303 <github@nono303.net>
2023-11-22 20:39:30 -06:00
Jakub Zelenka
a7a6151c4f
Fix bug #79945: Stream wrappers in imagecreatefrompng causes segfault
Closes GH-12696
2023-11-22 20:39:30 -06:00
Niels Dossche
df2af7ff65
Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
Have to use file_put_contents() instead of --FILE-- because we have to
actually load it using the exec command, *and* have to make multiple
files, and note that we can only load files relative from the current
directory, so we can't rely on files being in the sapi/phpdbg/tests
folder.

Closes GH-12680.
2023-11-22 20:39:29 -06:00
Niels Dossche
c376f9943f
Fix GH-12655: proc_open() does not take into account references in the descriptor array
Closes GH-12658.
2023-11-22 20:39:28 -06:00
Niels Dossche
e1c6a7c4de
Fix GH-12621: browscap segmentation fault when configured in the vhost
The temporary HashTable has a destructor that releases the string held
by the entry's value. However, browscap_intern_str(_ci) only incremented
the refcount for the reference created by the return value. As the
HashTable is only used during parsing, we don't need to manage the
reference count of the value anyway, so get rid of the destructor.

This is triggerable in two cases:
 - When using php_admin_value to set the ini at the activation stage
 - When running out of space for the opcache-interned strings

Closes GH-12634.
2023-11-22 20:39:28 -06:00
Niels Dossche
6641cd159e
Fix GH-12635: Test bug69398.phpt fails with ICU 74.1
ICU 74.1 contains new locale data that breaks the test.
Split the test based on the version number to resolve the issue.

Closes GH-12653.
2023-11-22 20:39:27 -06:00
Gina Peter Banyard
af155cf2dc
Mention correct bug number
I'm tired
2023-11-22 04:14:37 +00:00
Gina Peter Banyard
37f67a9a98
ext/standard: Fix GH-9316
http_build_query() default null argument for  is implicitly coerced to string

Closes GH-9316
2023-11-22 04:09:40 +00:00
Jakub Zelenka
178d3acf4c
PHP 8.3 is now 8.3.1-dev 2023-11-21 14:54:52 +00:00
Jakub Zelenka
f35a22adba
Prepare NEWS for 8.3.0 2023-11-21 14:00:51 +00:00
Jakub Zelenka
1e66e6ae73
Revert incomplete PG pipeline addition
Closes GH-12735
2023-11-20 16:22:29 +00:00
Peter Kokot
ff2b50889c
Refactor checks for fpathconf and pathconf
These two might not be available everywhere so we check them in
config.m4 when doing the configure step. Check is skipped for musl libc
due to limited implementation.

Constants that are defined into main/php_config.h:
HAVE_FPATHCONF
HAVE_PATHCONF

Implemented via GH-10238
Related to GH-10350
Fixes GH-12725
2023-11-20 13:39:21 +00:00
Ilija Tovilo
05a815399e
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix in-place modification of filename in php_message_handler_for_zend
2023-11-20 14:13:06 +01:00
Ilija Tovilo
d8e866da04
Fix in-place modification of filename in php_message_handler_for_zend
php_strip_url_passwd modifies url in-place. We cannot assume from
php_message_handler_for_zend that data is a temporary, modifiable string.

Fixes oss-fuzz #64209
Closes GH-12733
2023-11-20 14:12:25 +01:00
Ilija Tovilo
88d012f360
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix use-after-free of name in var-var with malicious error handler
2023-11-20 14:06:25 +01:00
Ilija Tovilo
ea52706a2a
Fix use-after-free of name in var-var with malicious error handler
Fixes oss-fuzz #54325
Closes GH-12732
2023-11-20 14:05:46 +01:00
Niels Dossche
6176538d99 Fix GH-11992: utf_encodings.phpt fails on Windows 32-bit
Similar bug as before in #10776, but now in other code.

Closes GH-12726.
2023-11-19 16:45:53 +01:00
Niels Dossche
0a3b891ba1 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12721: SplFileInfo::getFilename() segfault in combination with GlobIterator and no directory separator
2023-11-19 11:52:58 +01:00
Niels Dossche
4d41dffb4f Fix GH-12721: SplFileInfo::getFilename() segfault in combination with GlobIterator and no directory separator
This broke in 7cd8879 and 9bae9ab. NULL is a perfectly valid return
value that should be handled.

Closes GH-12722.
2023-11-19 11:52:27 +01:00
Jakub Zelenka
b3947744c7
Merge branch 'PHP-8.2' into PHP-8.3 2023-11-17 19:43:34 +00:00
Jakub Zelenka
f90b40416f
Fix #50713: openssl_pkcs7_verify() may ignore untrusted CAs
Closes GH-12499
2023-11-17 19:42:28 +00:00
Niels Dossche
2b42b73c0b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12616: DOM: Removing XMLNS namespace node results in invalid default: prefix
  Fix GH-12702: libxml2 2.12.0 issue building from src
2023-11-17 19:58:31 +01:00
Niels Dossche
3167d07603 Fix GH-12616: DOM: Removing XMLNS namespace node results in invalid default: prefix
The namespace data is freed and set to NULL, but there remain references
to the namespace declaration nodes. This (rightfully) confuses libxml2
because its invariants are broken. We also have to remove all remaining
references from the subtree. This fixes the data corruption bug.

Closes GH-12681.
2023-11-17 19:47:08 +01:00
Niels Dossche
8a95e616b9 Fix GH-12702: libxml2 2.12.0 issue building from src
Fixes GH-12702.

Co-authored-by: nono303 <github@nono303.net>
2023-11-17 19:46:30 +01:00
Jakub Zelenka
7abe3fe4c6
Merge branch 'PHP-8.2' into PHP-8.3 2023-11-17 13:41:50 +00:00
Jakub Zelenka
6734880ef5
Fix bug #79945: Stream wrappers in imagecreatefrompng causes segfault
Closes GH-12696
2023-11-17 13:26:42 +00:00
Niels Dossche
c83632a503 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Use __DIR__-relative path in tests
  Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
2023-11-15 22:00:44 +01:00
Niels Dossche
4f1103ef3b Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
Have to use file_put_contents() instead of --FILE-- because we have to
actually load it using the exec command, *and* have to make multiple
files, and note that we can only load files relative from the current
directory, so we can't rely on files being in the sapi/phpdbg/tests
folder.

Closes GH-12680.
2023-11-15 21:59:55 +01:00
Remi Collet
6d26d4c446
NEWS 2023-11-14 14:58:52 +01:00
Remi Collet
2536cf78b8
NEWS 2023-11-14 14:56:59 +01:00
Remi Collet
0b5824e17c
NEWS 2023-11-14 14:56:06 +01:00
Niels Dossche
5c25742c26 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12655: proc_open() does not take into account references in the descriptor array
2023-11-13 19:34:40 +01:00
Niels Dossche
86c7d3ed1f Fix GH-12655: proc_open() does not take into account references in the descriptor array
Closes GH-12658.
2023-11-13 19:29:44 +01:00
Niels Dossche
1fb73463d3 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12621: browscap segmentation fault when configured in the vhost
2023-11-11 18:36:32 +01:00
Niels Dossche
7353c7ce17 Fix GH-12621: browscap segmentation fault when configured in the vhost
The temporary HashTable has a destructor that releases the string held
by the entry's value. However, browscap_intern_str(_ci) only incremented
the refcount for the reference created by the return value. As the
HashTable is only used during parsing, we don't need to manage the
reference count of the value anyway, so get rid of the destructor.

This is triggerable in two cases:
 - When using php_admin_value to set the ini at the activation stage
 - When running out of space for the opcache-interned strings

Closes GH-12634.
2023-11-11 18:35:57 +01:00
Niels Dossche
608842b5b7 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12635: Test bug69398.phpt fails with ICU 74.1
2023-11-11 17:04:37 +01:00
Niels Dossche
333cf3c111 Fix GH-12635: Test bug69398.phpt fails with ICU 74.1
ICU 74.1 contains new locale data that breaks the test.
Split the test based on the version number to resolve the issue.

Closes GH-12653.
2023-11-11 17:04:01 +01:00
Dmitriy Degtyaryov
63898008c0 Fix GH-9344: pgsql pipeline mode proposal.
Adding pg_send_flush_request.
Fix freeze after next execute pg_send_* on PQgetResult in _php_pgsql_link_has_results.
Set nonblocking for pipelining mode.
No flush client buffer in pg_send_* for pipelining mode.

Close GH-12644
2023-11-10 16:06:04 +00:00
Niels Dossche
e6fef2944b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12633: sqlite3_defensive.phpt fails with sqlite 3.44.0
  Fix GH-12628: The gh11374 test fails on Alpinelinux
2023-11-10 00:12:47 +01:00
Niels Dossche
fbda6b50a3 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-12633: sqlite3_defensive.phpt fails with sqlite 3.44.0
  Fix GH-12628: The gh11374 test fails on Alpinelinux
2023-11-10 00:08:09 +01:00
SakiTakamachi
2a4775d6a7 Fix GH-12633: sqlite3_defensive.phpt fails with sqlite 3.44.0
Removes 'PRAGMA writable_schema;'.

From sqlite changelog https://www.sqlite.org/releaselog/3_44_0.html:
> The SQLITE_DBCONFIG_DEFENSIVE setting now prevents PRAGMA writable_schema
> from being turned on.
> Previously writable_schema could be turned on, but would not actually allow
> the schema to be writable. Now it simply cannot be turned on.

Closes GH-12636.
2023-11-10 00:03:33 +01:00
Niels Dossche
78fba9cb80 Fix GH-12628: The gh11374 test fails on Alpinelinux
Closes GH-12636.
2023-11-10 00:01:22 +01:00