Commit Graph

15624 Commits

Author SHA1 Message Date
Sergey Panteleev
3b5321dffe
PHP-8.2 is now for PHP 8.2.20-dev 2024-04-23 17:22:54 +03:00
David Carlier
3a300e9213
ext/pcntl: signals list update for dragonflybsd related to checkpoint.
- SIGCKPT checkpoint and continue.
- SIGCKPTEXIT checkpoint and exit.

Close GH-14011
2024-04-22 21:21:52 +01:00
Peter Kokot
71aae5a17e
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13727: Building with -Werror=strict-prototypes (#14029)
2024-04-22 21:22:28 +02:00
Peter Kokot
44775b7617
Fix GH-13727: Building with -Werror=strict-prototypes (#14029)
This is addon to the GH-13727 bug fix. When configuring the build with:

  ./configure CFLAGS=-Werror=strict-prototypes

libtool check for parsing nm command would fail:

  checking command to parse /usr/bin/nm -B output from cc object... failed

Upstream libtool has this specific check already fixed. Note that this
works only with Autoconf version 2.72 and later and is preparation for
future compilers that might have this error enabled by default.
2024-04-22 21:21:40 +02:00
Ilija Tovilo
5899cabff0
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Temporary reset filename and lineno override before autoload
2024-04-22 10:57:47 +02:00
SATO Kentaro
f8b9030b4e
Temporary reset filename and lineno override before autoload
Closes GH-10232
Closes GH-13313
2024-04-22 10:56:45 +02:00
Peter Kokot
f28ddec540
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix erroneous dnl appended in configure (#14013)
2024-04-21 17:23:58 +02:00
Peter Kokot
7d3d8de1f3
Fix erroneous dnl appended in configure (#14013)
This is a backport of commit 03f15534a1 to
PHP-8.2 due to GH-14002 and fixes the PHP_CXX_COMPILE_STDCXX check in
ext/intl whether the specified C++ standard is mandatory or optional.

The `dnl` (Discard to Next Line) M4 macro in this combination of `m4_if`
macros and arguments isn't properly replaced and a literal `dnl` string
is appended in the configure script. The `[]dnl` works ok.
2024-04-21 17:23:22 +02:00
Niels Dossche
dd1a32dc1c
NEWS
Closes GH-13782.
2024-04-21 16:08:26 +02:00
David Carlier
2636104a83
Merge branch 'PHP-8.2' into PHP-8.3 2024-04-20 17:11:33 +01:00
David Carlier
42443b4c2e
ext/session: fix _read/_write buffer limit.
MSDN pages mention the buffer size upper limit is INT_MAX not UINT_MAX.
inspired by GH-13205.

Close GH-14017
2024-04-20 17:11:03 +01:00
Saki Takamachi
43064160c4
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13998: Manage refcount of agg_context->val correctly (#14004)
2024-04-20 22:34:31 +09:00
Saki Takamachi
2a1aa8cac5
Fix GH-13998: Manage refcount of agg_context->val correctly (#14004)
When step_callback fails, agg_context->val is passed dtor, but agg_context->val
is also used in final_callback regardless of the success/failure of step_callback,
so should not call dtor.

closes #14004
fixes #13998
2024-04-20 22:33:25 +09:00
Ilija Tovilo
4393198bbd
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix missing handling of CALLABLE_CONVERT in cleanup_unfinished_calls()
2024-04-19 20:06:15 +02:00
Ilija Tovilo
b3e26c3036
Fix missing handling of CALLABLE_CONVERT in cleanup_unfinished_calls()
Fixes GH-14003
2024-04-19 20:04:51 +02:00
David Carlier
e94f3a7b40
Merge branch 'PHP-8.2' into PHP-8.3 2024-04-19 10:07:11 +01:00
David Carlier
cc46a4e6b5
ext/intl: level up c++ runtime std for icu 74 and onwards.
to align with what is required to build icu 74 itself.

Close GH-14002
2024-04-19 10:04:25 +01:00
Saki Takamachi
dd5cdfd645
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13984: Buffer size is now checked before memcmp (#13991)
2024-04-18 08:37:55 +09:00
Saki Takamachi
fda91a0543
Fix GH-13984: Buffer size is now checked before memcmp (#13991)
Fixed an issue where a buffer overflow occurred when a string shorter than
`:memory:` was passed as the db name of pdo_sqlite.

fixed #13984
closes #13991
2024-04-18 08:35:50 +09:00
Ilija Tovilo
3d86d9acc1
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add missing COMPILE_IGNORE_OTHER_FILES check for static calls
2024-04-17 22:39:48 +02:00
Ilija Tovilo
1acd7a0919
Add missing COMPILE_IGNORE_OTHER_FILES check for static calls
Closes GH-13986
2024-04-17 22:39:05 +02:00
Arnaud Le Blanc
812d19d67e
[ci skip] NEWS 2024-04-16 14:20:05 +02:00
Arnaud Le Blanc
d47aaacf3c
[ci skip] NEWS 2024-04-16 14:18:48 +02:00
David Carlier
d40726670f
ext/pcntl: pcntl_getqos_class/pcntl_setqos_class addition.
Introducting macOs Quality Of Service through those two calls.
on macOs arm64/M*, there is no concept of individual cores, thus
the old thread policy for cpu affinity does not work here.
Instead, the user can apply to the current process the level of
 performance/energy consumption they wish from the highest
QosClass::UserInteractive to QosClass::Background.

Close GH-13945
2024-04-15 18:52:28 +01:00
Niels Dossche
550e0ceb79
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13931: Applying zero offset to null pointer in Zend/zend_opcode.c
2024-04-15 19:39:59 +02:00
Niels Dossche
c3acfb1b57
Fix GH-13931: Applying zero offset to null pointer in Zend/zend_opcode.c
In the test cases, the compiler bails out due to a fatal error.
The data structures used by the compiler will contain stale values.
In particular, for the test case CG(loop_var_stack) will contain data.
The next compilation will incorrectly use elements from the previous
stack.
To solve this, we reset part of the compiler data structures.
We don't do a full re-initialization via init_compiler() because that will
also reset streams and resources.

Closes GH-13938.
2024-04-15 19:39:05 +02:00
Jakub Zelenka
c18690aeaa
Merge branch 'PHP-8.2' into PHP-8.3 2024-04-14 14:32:46 +01:00
Jakub Zelenka
c618d3e84b
Set streams NEWS category for file_get_contents fix 2024-04-14 14:32:10 +01:00
Jakub Zelenka
4dad74f250
Merge branch 'PHP-8.2' into PHP-8.3 2024-04-14 14:27:05 +01:00
Damian Wójcik
8421cfda61
Fix file_get_contents() on Windows fails with "errno=22 Invalid argument"
Closes GH-13948
2024-04-14 14:26:10 +01:00
Niels Dossche
72b2524c58
[ci skip] NEWS
News for GH-13041.
2024-04-13 01:40:57 +02:00
Tim Düsterhus
08b2ab22f4
Include the source location in Closure names (#13550)
* Include the source location in Closure names

This change makes stack traces involving Closures, especially multiple
different Closures, much more useful, because it's more easily visible *which*
closure was called for a given stack frame.

The implementation is similar to that of anonymous classes which already
include the file name and line number within their generated classname.

* Update scripts/dev/bless_tests.php for closure naming

* Adjust existing tests for closure naming

* Adjust tests for closure naming that were not caught locally

* Drop the namespace from closure names

This is redundant with the included filename.

* Include filename and line number as separate keys in Closure debug info

* Fix test

* Fix test

* Include the surrounding class and function name in closure names

* Fix test

* Relax test expecations

* Fix tests after merge

* NEWS / UPGRADING
2024-04-12 18:21:13 +02:00
Jakub Zelenka
3b93f13199
Revert "ext/mysqlnd: support ER_CLIENT_INTERACTION_TIMEOUT"
This reverts commit 5035b85090.

This broke Doctrine DBAL tests - more discussion in GH-13618.
2024-04-12 10:56:09 +01:00
Michael Orlitzky
4ded247675
ext/fileinfo/tests/bug78987.phpt: increase a memory limit
This test performs a few checks to ensure that "not too much" memory
is used while fileinfo is detecting encodings. It is however platform
specific, and memory usage varies across hosts and as libmagic changes.

Recently a Gentoo user reported a failure in this test at,

  https://bugs.gentoo.org/927461

on a big-endian PPC64 machine with output,

  ---- EXPECTED OUTPUT
  131072   => ok
  262144   => ok
  524288   => ok
  1048576  => ok
  2097152  => ok
  4194304  => ok
  8388608  => ok
  16777216 => ok
  ---- ACTUAL OUTPUT
  131072   => 10092544
  262144   => 10092544
  524288   => 12189696
  1048576  => 12189696
  2097152  => 14352384
  4194304  => 18612224
  8388608  => 24903680
  16777216 => 37486592
  ---- FAILED

Those numbers are with 8.3.4 and therefore missing commit b7c5813c
which also raises the limits. Checking the "actual" numbers above
against the current values, we see that the limit for 524288 would
need to be bumped to 12189696 to allow this test to pass. Since that
seems reasonable, that's what this commit does.

Closes GH-13795
Closes GH-13940
2024-04-11 15:58:06 +02:00
Arnaud Le Blanc
e2e4e64a20 [ci skip] NEWS 2024-04-11 13:32:02 +02:00
Arnaud Le Blanc
ed84bcd8b1 [ci skip] NEWS 2024-04-11 13:29:29 +02:00
David Carlier
0e16e29b40
ext/sockets: socket_create_listen update.
going from 128 to system's SOMAXCONN by default to be able to increase
the queue of connections to be handled.
Also, for Haiku SOMAXCONN is only 32.

Close GH-13854
2024-04-10 18:39:38 +01:00
Yuya Hamada
44e8301cf6
Add grapheme_str_split function
I noticed that PHP does not have a grapheme cluster based str_split function.
So I created the grapheme_str_split function.

This feature will allow you to correctly handle emoji
and variable selectors.

Co-authored-by: Ayesh Karunaratne <Ayesh@users.noreply.github.com>

Close GH-13580
2024-04-10 18:20:23 +01:00
Eric Mann
67fc53e1be
PHP-8.3 is now for PHP 8.3.7-dev 2024-04-10 08:45:14 -07:00
Appla
5035b85090
ext/mysqlnd: support ER_CLIENT_INTERACTION_TIMEOUT
Closes GH-13618.
2024-04-10 13:33:04 +02:00
Ben Ramsey
7ca4300db8
Merge branch 'PHP-8.3' 2024-04-09 23:55:11 -05:00
Ben Ramsey
049082e4d0
Update NEWS 2024-04-09 23:53:27 -05:00
Ben Ramsey
3d9941fd1e
Merge branch 'PHP-8.2' into PHP-8.3 2024-04-09 23:49:53 -05:00
Ben Ramsey
a9ffc447a4
Merge branch 'PHP-8.1' into PHP-8.2 2024-04-09 23:49:31 -05:00
Ben Ramsey
de4f7f9321
Update NEWS 2024-04-09 23:41:29 -05:00
Saki Takamachi
f56ba62ccf
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  NEWS: remove ZWSP
2024-04-10 10:00:29 +09:00
Saki Takamachi
20959c38ad
NEWS: remove ZWSP 2024-04-10 10:00:14 +09:00
David Carlier
645af9fb17
ext/sockets: adding solaris/illumos SO_EXCLBIND constant.
when set to "true", neutralises the effect of SO_REUSEADDR/SO_REUSEPORT
making the socket binding exclusive.

Close GH-13912
2024-04-09 21:41:22 +01:00
David Carlier
db2869346c
ext/posix: posix_isatty set errno for it too.
Close GH-13918
2024-04-09 17:34:03 +01:00
Niels Dossche
b701fa8a34
Update news 2024-04-08 21:04:34 +02:00
Niels Dossche
ea0268264b
Fix GH-13903: ASAN false positive underflow when executing copy()
Closes GH-13917.
2024-04-08 21:03:42 +02:00
qiangxuhui
0766ac6e35
loongarch64 support for fibers
Add loongarch64 assembly files from Boost, needed for fibers support,
and hook up loongarch64 fibers support during configure.

Close GH-13914
2024-04-08 18:59:02 +01:00
Niels Dossche
07fe3b2920
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix potential NULL pointer dereference before calling EVP_SignInit
2024-04-08 19:31:13 +02:00
icy17
6f8bda0582
Fix potential NULL pointer dereference before calling EVP_SignInit
Closes GH-13870.
2024-04-08 19:30:26 +02:00
Bob Weinand
f52b2a9cdc Merge branch 'PHP-8.2' into PHP-8.3 2024-04-08 15:10:29 +02:00
Bob Weinand
af098acd6e Always load EX(opline) into the current frame in JIT when observers are enabled
Fixes #13772.
Closes #13776.
2024-04-08 15:09:14 +02:00
Arnaud Le Blanc
0da1eb5fb9 [ci skip] NEWS 2024-04-08 15:03:21 +02:00
Arnaud Le Blanc
85d621242a [ci skip] NEWS 2024-04-08 15:01:15 +02:00
Niels Dossche
92136640aa
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13860: Incorrect PHP_STREAM_OPTION_CHECK_LIVENESS case in ext/openssl/xp_ssl.c - causing use of dead socket
2024-04-07 21:37:01 +02:00
Niels Dossche
2aae14c8a9
Fix GH-13860: Incorrect PHP_STREAM_OPTION_CHECK_LIVENESS case in ext/openssl/xp_ssl.c - causing use of dead socket
php_socket_errno() may return a stale value when recv returns a
value >= 0. As such, the liveness check is wrong.
This is the same bug as #70198 (fixed in GH-1456). So we fix it in the
same way.

Closes GH-13895.
2024-04-07 21:35:43 +02:00
David Carlier
d8f2900574
ext/pcntl: adding pcntl_getcpu.
using sched_getcpu under the hood (Linux and FreeBSD).
Returns the current cpu id for the current process.
For Linux, we need to see beyond the sole presence of the symbol
to consider it.
Mostly useful, for now, in the cpu affinity context since
the os can migrate processes as it sees fits otherwise.

Clos GH-13908
2024-04-07 20:05:03 +01:00
David Carlier
01817e99ab
ext/pcntl pcntl_signal_get_handler update.
The situation varies from platform to another, thus taking in
account the complexity of it.

Close GH-13902
2024-04-07 13:25:45 +01:00
David Carlier
1cf8291c85
ext/pcntl: cpu affinity api introduction.
For now, working on Linux, FreeBSD >= 13.x and DragonFlyBSD.
Handy wrapper to assign an array of cpu ids or to retrieve the cpu ids
assigned to a given process.

pcntl_setaffinity inserts valid unique cpu ids (within the range of available
cpus).

Close GH-13893
2024-04-07 00:56:54 +01:00
Niels Dossche
eb244fcb49
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS
  Fix GH-13891: memleak and segfault when using ini_set with session.trans_sid_hosts (#13892)
2024-04-06 13:45:00 +02:00
Niels Dossche
8367e9cc3b
[ci skip] NEWS 2024-04-06 13:44:34 +02:00
David Carlier
ae4978a139
ext/pcntl: adding pcntl_setns for Linux >= 5.3
allows a given process to join an existing Linux namespace, relatively
complementary to the existing pcntl_unshare.

Close GH-13878
2024-04-04 18:45:15 +01:00
Niels Dossche
5daf080b6b
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS
  Fix shift out of bounds on 32-bit non-fast-path platforms (#10941)
2024-04-04 19:29:29 +02:00
Niels Dossche
dfbad9f227
[ci skip] NEWS 2024-04-04 19:29:04 +02:00
Niels Dossche
e34c86ce1a
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix gcc-14 Wcalloc-transposed-args warnings
2024-04-01 20:34:37 +02:00
Cristian Rodríguez
18d70db091
Fix gcc-14 Wcalloc-transposed-args warnings
gcc-14 and later warns of inverted arguments in calloc or
calloc-like __alloc_size__ annotated functions.

Closes GH-13818.
2024-04-01 20:34:14 +02:00
Niels Dossche
3f598a3073
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13856: Member access within null pointer of type 'ps_files' in ext/session/mod_files.c
2024-04-01 14:16:23 +02:00
Niels Dossche
46f45a51b4
Fix GH-13856: Member access within null pointer of type 'ps_files' in ext/session/mod_files.c
We should not mark the session as opened when there was a failure in
open.

Closes GH-13858.
2024-04-01 14:15:51 +02:00
Niels Dossche
17f936eec7
[ci skip] NEWS 2024-04-01 13:49:27 +02:00
Niels Dossche
30885f3b5f
Implement request #71571: XSLT processor should provide option to change maxDepth (#13731)
There are two depth limiting parameters for XSLT templates.
1) maxTemplateDepth
   This corresponds to the recursion depth of a template. For very
   complicated templates this can be hit.
2) maxTemplateVars
   This is the total number of live variables. When using recursive
   templates with lots of parameters you can hit this limit.

This patch introduces two new properties to XSLTProcessor that
corresponds to the above variables.
2024-03-31 21:21:23 +02:00
Niels Dossche
b1a6832287
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13833: Applying zero offset to null pointer in zend_hash.c
2024-03-31 14:25:39 +02:00
Niels Dossche
47bb6c1b79
Fix GH-13833: Applying zero offset to null pointer in zend_hash.c
MAPPHAR_FAIL will call the destructor of the manifest, mounted_dirs, and
virtual_dirs tables. When a new phar object is allocated using (p)ecalloc,
the bytes are zeroed, but the flag for an uninitialized table is
non-zero. So we have to manually set the flag in case that we have a
code path that can destroy the tables without first initializing them at
least once.

Closes GH-13847.
2024-03-31 14:25:08 +02:00
Fabrice Fontaine
5a043c26c8
Zend/zend_call_stack.c: fix build for Linux/uclibc-ng without pthread.
Fix the following build failure without pthread raised since version
8.3.0 and
a11c8a3039:

/home/buildroot/instance-0/output-1/build/php-8.3.4/Zend/zend_call_stack.c:39:11: fatal error: pthread.h: No such file or directory
   39 | # include <pthread.h>
      |           ^~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/a4ef648a9da50b26ed56d5d490e4cf5a1bfff970

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Close GH-13843
2024-03-30 22:19:02 +00:00
Niels Dossche
6a23c7fa91
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13836: Renaming a file in a Phar to an already existing filename causes a NULL pointer dereference
2024-03-30 18:04:29 +01:00
Niels Dossche
ed8ed714a8
Fix GH-13836: Renaming a file in a Phar to an already existing filename causes a NULL pointer dereference
If the destination already exists, then the `add` function on the
manifest will return NULL, resulting in a NULL entry and therefore a
NULL deref. As `copy()` (not `Phar::copy`) chooses to succeed and
overwrite the destination if it already exists, we should do the same.
Therefore the fix is as simple as changing `add` to `update`.

Closes GH-13840.
2024-03-30 18:03:55 +01:00
Niels Dossche
508ed9b474 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13827: Null pointer access of type 'zval' in phpdbg_frame
2024-03-29 17:55:33 +01:00
Niels Dossche
d3f1f3ab40 Fix GH-13827: Null pointer access of type 'zval' in phpdbg_frame
We don't always have the line and filename in a backtrace frame, but
phpdbg assumes we do.

Closes GH-13831.
2024-03-29 17:54:23 +01:00
Jakub Zelenka
f4a9ae90f9
Merge branch 'PHP-8.2' into PHP-8.3 2024-03-29 16:25:09 +00:00
Jakub Zelenka
c1bd9a932a
Fix GH-10495: feof on OpenSSL stream hangs indefinitely
This fixes the issue with unbounded waiting on SSL_peek which can happen
when only part of the record is fetched. It makes socket non blocking so
it is possible to verify if OpenSSL is expecting some more data or if
there is an error.

This also fixes bug #79501

Closes GH-13487
2024-03-29 16:22:22 +00:00
Jakub Zelenka
caec2b6186
Merge branch 'PHP-8.2' into PHP-8.3 2024-03-29 16:09:09 +00:00
Jakub Zelenka
c087398cc2
Fix GH-13264: Part 1 - Memory leak on filter failure
Closes GH-13790
2024-03-29 16:06:49 +00:00
Jakub Zelenka
cd6a58114e Fix NEWS for the last FPM change 2024-03-29 16:05:13 +00:00
Paul Ripke
2d6bd1644d Fixed GH-13581: threaded mod_php fails on NetBSD with No space available for Thread Local Storage.
Close GH-13832
2024-03-29 15:16:51 +00:00
David Carlier
b82024b13c ext/sockets: adding Linux's TCP_SYNCNT constant.
Useful to control how many SYN packets the client will send to the
server before giving up establishing a connection if the server does
not respond (usually 5 or 6 by default).

Close GH-13816
2024-03-29 14:52:53 +00:00
Jakub Zelenka
8edd621501
Merge branch 'PHP-8.2' into PHP-8.3 2024-03-28 15:45:45 +00:00
Jakub Zelenka
d0a8d41eee
Fix GH-13563: Setting bool values via env in FPM config fails
Closes GH-13786
2024-03-28 15:43:50 +00:00
Remi Collet
6c5814dade
revert base64_encode change 2024-03-27 08:08:43 +01:00
Niels Dossche
55e617691a Fix GH-13433: Segmentation Fault in zend_class_init_statics when using opcache.preload
This regressed in 9a250cc9d6, which allowed static properties to get
overridden by a trait during inheritance. In particular, because of the
change to the loop in zend_update_parent_ce(), it's not guaranteed that
all indirects are after one another.

This means that during persisting the zvals of the static members table,
some static properties may be skipped. In case of the test code, this
means that the array in the trait will keep referring to the old, new
freed, stale value. To solve this, we check the type for IS_INDIRECT,
which is the same as what zend_persist_calc() is already doing anyway.

Since 2543e61aed we can check for IS_INDIRECT to see if it should be
persisted or not.

Closes GH-13794.
2024-03-26 21:29:07 +01:00
Eric Mann
9381129d1b
PHP-8.3 is now for PHP 8.3.6-dev 2024-03-26 09:08:14 -07:00
Remi Collet
dd6e738fe4
[ci skip] NEWS for base64_encode 2024-03-26 13:50:31 +01:00
Pierrick Charron
7942268899
PHP-8.2 is now for PHP 8.2.19-dev 2024-03-26 08:49:44 -04:00
Arnaud Le Blanc
ff2359b62e [ci skip] 2024-03-25 16:23:44 +01:00
Arnaud Le Blanc
f968a63162 [ci skip] 2024-03-25 16:19:32 +01:00
Niels Dossche
81ae6064ce Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS
  Fix incorrect check in fpm_shm_free() (#13797)
2024-03-24 13:58:41 +01:00
Niels Dossche
e3fbfddbd2 [ci skip] NEWS 2024-03-24 13:58:09 +01:00
Ayesh Karunaratne
3de3e137bf ext/openssl: Bump minimum required OpenSSL version to 1.1.1
Bumps the minimum required OpenSSL version from 1.0.2 to 1.1.1.

OpenSSL 1.1.1 is an LTS release, but has reached[^1] EOL from upstream. However, Linux distro/OS vendors
continue to ship OpenSSL 1.1.1, so 1.1.1 was picked as the minimum. The current minimum 1.0.2 reached
EOL in 2018.

Bumping the minimum required OpenSSL version makes it possible for ext-openssl to remove a bunch of
conditional code, and assume that TLS 1.3 (shipped with OpenSSL 1.1.1) will be supported everywhere.

 - Debian buster: 1.1.1[^2]
 - Ubuntu 20.04: 1.1.1[^3]
 - CentOS/RHEL 7: 1.0.2
 - RHEL 8/Rocky 8/EL 8: 1.1.1
 - Fedora 38: 3.0.9 (`openssl11` provides OpenSSL 1.1 as well)

RHEL/CentOS 7 reaches EOL mid 2024, so for PHP 8.4 scheduled towards the end of this year, we can safely
bump the minimum OpenSSL version.

[^1]: https://www.openssl.org/blog/blog/2023/03/28/1.1.1-EOL/index.html
[^2]: https://packages.debian.org/buster/libssl-dev
[^3]: https://packages.ubuntu.com/focal/libssl-dev
2024-03-23 15:12:06 +00:00
Niels Dossche
6615476db9 [ci skip] NEWS 2024-03-22 15:01:40 +01:00
haszi
6150bf5ee4
Fix url_rewriter.hosts not used for output_add_rewrite_var()
If fixes issue where session.trans_sid_hosts used instead of
url_rewriter.hosts for output_add_rewrite_var().

Closes GH-13294
2024-03-22 13:57:43 +00:00
Remi Collet
c007dca32d
[ci skip] NEWS 2024-03-22 11:39:46 +01:00
Remi Collet
6f11cc46e0
[ci skip] NEWS 2024-03-22 11:39:17 +01:00
Niels Dossche
67ce1d859d Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix incorrect charset length in check_mb_eucjpms()
2024-03-22 11:32:15 +01:00
Niels Dossche
8ffac997aa Fix incorrect charset length in check_mb_eucjpms()
Closes GH-13781.
2024-03-22 11:31:36 +01:00
tekimen
4d51bfa270
[RFC] Add mb_ucfirst and mb_lcfirst functions (#13161) 2024-03-20 17:25:19 +01:00
Vincent Langlet
741570c30f Fix phpdoc for DOMDocument load methods
Closes GH-13763.
2024-03-20 17:22:04 +01:00
Ilija Tovilo
3301d9602a
Restore error handler after running it
Symfony relies on finding the exception handler in the handler stack. There's
currently no clean API to find it, so they pop all the handlers, and push them
again once the stack is empty. This PR attempts to minimize the BC break by
pushing the current handler onto the stack and clearing the current handler, and
restoring it once it has finished. This is essentially equivalent to
set_exception_handler(null) and restore_exception_handler().

restore_exception_handler() however is only called if the exception handler is
still unset. If the handler has pushed a new handler in the meantime, we assume
it knows what it's doing.

Fixes GH-13446
Closes GH-13686
2024-03-20 10:53:20 +01:00
Arnaud Le Blanc
df7252624f [ci skip] NEWS 2024-03-19 13:06:29 +01:00
Bob Weinand
6d6cd29909 Merge branch 'PHP-8.2' of https://github.com/php/php-src into PHP-8.3 2024-03-18 19:04:12 +01:00
Bob Weinand
10d912d6e3
Fix GH-13712: Segmentation fault for enabled observers when calling trait method of internal trait when opcache is loaded (#13735)
Inherited methods regardless of source must share the original runtime cache. Traits were missed.
This adds ZEND_ACC_TRAIT_CLONE to internal functions as well to allow easy distinction of these.
2024-03-18 19:02:42 +01:00
Peter Kokot
f66696548b
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12019: ext/gd/config.m4: don't forget GDLIB_CFLAGS in feature tests
2024-03-18 11:58:56 +01:00
Michael Orlitzky
00799320ec
Fix GH-12019: ext/gd/config.m4: don't forget GDLIB_CFLAGS in feature tests
In commit 85e5635a, a feature test for the various libgd image formats
was added. That test however erroneously omits the GDLIB_CFLAGS (from
pkg-config) during compilation. This can lead to build failures and
therefore false negatives from the test.

Here, we add $GDLIB_CFLAGS to $CFLAGS for the duration of the test.

Closes GH-12019
2024-03-18 11:57:20 +01:00
David Carlier
868257a3de Fix GH-13727: macro generating invalid call test prototypes fixes.
autoconf/libtool generating code to test features missed `void` for
C calls prototypes w/o arguments.
Note that specific changes related to libtool have to be upstreamed.

Co-authored-by: Peter Kokot <petk@php.net>

close GH-13732
2024-03-18 06:53:39 +00:00
David Carlier
4c467e6eb8 ext/sockets: adding few constants for NetBSD.
SOCK_CONN_DGRAM (and its alias SOCK_DCCP) for connection orientated
datagram.

Close GH-13728
2024-03-17 21:44:22 +00:00
Niels Dossche
dab5f8c15c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13685: Unexpected null pointer in zend_string.h
2024-03-17 18:38:36 +01:00
Niels Dossche
aa34e0acb4 Fix GH-13685: Unexpected null pointer in zend_string.h
Regressed in 6fbf81c.

There is a missing error check on spl_filesystem_file_read_line(), which
means that if the line could not be read (e.g. because we're at the end
of the file), it will not set intern->u.file.current_line, which will
cause a NULL pointer deref later on.

Fix it by adding a check, and reintroducing the silent flag partially to
be able to throw an exception like it did in the past.

Closes GH-13692.
2024-03-17 18:37:52 +01:00
Niels Dossche
0f79c22627 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix potential memory leak in XPath evaluation results
2024-03-14 21:11:19 +01:00
Niels Dossche
30c58aba0c Fix potential memory leak in XPath evaluation results 2024-03-14 21:08:25 +01:00
David Carlier
b3410360cc ext/gettext: updating apis accepting domain behavior.
to be more in line with the proper usage ; normally domain should not
be empty strings.

Close GH-13691
2024-03-13 20:33:47 +00:00
Tim Düsterhus
0d0375ab91
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  random: Initialize the `mode` field when seeding in `php_random_default_status()` (#13690)
2024-03-13 20:14:42 +01:00
Tim Düsterhus
f34721cabd
random: Initialize the mode field when seeding in php_random_default_status() (#13690)
This is not just an issue due to missing initialization since moving the state
struct directly into the module globals. In earlier versions changing the mode
to `MT_RAND_PHP` within a single request would also affect the mode for
subsequent requests.

Original commit message follows:

This is a follow-up fix for GH-13579. The issue was detected in the nightly
MSAN build.

(cherry picked from commit bf0abd1629)
2024-03-13 20:13:48 +01:00
Niels Dossche
b58dc6fd1a Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13680: Segfault with session_decode and compilation error
2024-03-13 17:49:31 +01:00
Niels Dossche
6985aff7c3 Fix GH-13680: Segfault with session_decode and compilation error
It's illegal to return from a bailout because that doesn't restore the
original bailout data. Return outside of it.

Test by YuanchengJiang

Closes GH-13689.
2024-03-13 17:47:25 +01:00
Claudio Jeker
4bf4c24aa8 Implement fcontext handling for sparc64_sysv_elf.
This was tested on OpenBSD sparc64 and all fiber related tests pass.
On OpenBSD stackghost prevents the modification of the return address
and therefor an extra trampoline is needed in make_fcontext(). This
should not matter on other OS implementing sysv ABI and the trampoline
should work there as well.

Close GH-13382.
2024-03-12 11:06:18 +00:00
Arnaud Le Blanc
1b5d9f657b [ci skip] NEWS 2024-03-11 15:14:28 +01:00
Arnaud Le Blanc
809446d3d1 [ci skip] NEWS 2024-03-11 15:13:03 +01:00
Niels Dossche
134464e451 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add ZPP checks in DOMNode::{__sleep,__wakeup}
2024-03-09 23:20:16 +01:00
Niels Dossche
e3711af8ce Add ZPP checks in DOMNode::{__sleep,__wakeup}
Closes GH-13651.
2024-03-09 23:19:49 +01:00
Jakub Zelenka
4612bb77fb
Merge branch 'PHP-8.2' into PHP-8.3 2024-03-09 19:59:06 +00:00
divinity76
2343791aff
Fix GH-13203: file_put_contents fail on strings over 4GB on Windows
Closes GH-13205
2024-03-09 19:58:28 +00:00
Niels Dossche
a47849deaf
Change return type of hash_update() to true (#13652)
It was already the case that this could only return true, update the
stubs to reflect that.

Closes GH-13614.
2024-03-09 20:02:50 +01:00
Niels Dossche
14b6c981c3
[RFC] Add a way to opt-in ext/dom spec compliance (#13031)
RFC: https://wiki.php.net/rfc/opt_in_dom_spec_compliance
2024-03-09 16:56:00 +01:00
Jakub Zelenka
a19267d488
Fix GH-11086: FPM: config test runs twice in daemonised mode
The previous check for STDERR did not work so this fixes it.

Closes GH-13357
2024-03-09 09:41:59 +00:00
Saki Takamachi
f9ddd2b0c8
NEWS 2024-03-09 10:36:07 +09:00
Niels Dossche
d6d3370034
Implement GH-13609: Dump wrapped object in WeakReference class (#13621)
I chose "object" as that's also the argument name in WeakReference::create.
2024-03-08 18:31:24 +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
Niels Dossche
91d18d8120 [ci skip] NEWS 2024-03-07 20:50:30 +01:00
Niels Dossche
3ddd341329 [ci skip] NEWS and UPGRADING
Closes GH-13466.
2024-03-07 20:27:19 +01: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
Marc Bennewitz
dbd976a67f
Singular DateTime::[get|set]Microsecond & no tentative return type (#13486)
* Singular DateTime::[get|set]Microsecond & no tentative return type

* Added missing getMicrosecond to DateTimeInterface
2024-03-06 09:18:22 +00:00
Niels Dossche
74c887b04e [ci skip] NEWS and UPGRADING 2024-03-05 20:54:56 +01:00
Arnaud Le Blanc
e220e84b36 [ci skip] 2024-03-05 12:19:59 +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
72779e6d64
NEWS 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
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
David Carlier
7f01871915 ext/gettext: bind_textdomain_codeset should not accept empty domains.
the man page specifies that for bind_textdomain_codeset, like
bindtextdomain, the domain should not be an empty string.

close GH-13571
2024-03-02 18:59:18 +00: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
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
Gina Peter Banyard
47a199c8b4
Add http_(get|clear)_last_reponse_headers() functions (#12500)
This is to provide an alternative to the $http_response_header magic variable

RFC: https://wiki.php.net/rfc/http-last-response-headers
2024-02-29 16:41:09 +00:00
Jakub Zelenka
47dca339a4
PHP-8.3 is now for PHP-8.3.5-dev 2024-02-28 11:46:49 +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
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
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
Gina Peter Banyard
dbf0b6aa42
ext/intl: Refactor ResourceBundle get and dimension access (#13503) 2024-02-26 17:03:17 +00:00
Peter Kokot
ba27fab862 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix detection of image formats in system gd library
2024-02-26 14:01:31 +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
Michael Orlitzky
f732ab8b3e Fix detection of image formats in system gd library
- Use gdFontCacheShutdown() to detect freetype
  Currently we look for gdImageStringFT() to determine whether or not gd
  has freetype support... but that function always exists. This leads
  PHP to believe that gd has freetype support when it does not, and can
  lead to build failures.

  The gdFontCacheShutdown() function, on the other hand, is only present
  when gd was built with freetype support. Let's use that instead.

- Fix GD image format detection
  We currently check for, say, AVIF support by attempting to link a
  program that calls libgd's gdImageCreateFromAvif() function. But
  perversely, that function always exists in libgd; moreover when AVIF
  support is missing it emits a warning and returns normally. Thus
  our straightforward link test becomes not so straightforward.

  This commit adds a new macro PHP_GD_CHECK_FORMAT that compiles, links,
  and runs a test program instead. The test program overrides that "emit
  a warning" handler so that the program actually fails if the format
  we're looking for is not supported. This fixes detection of AVIF and
  the other formats we check for in an external libgd.

- ext/gd/tests/bug77391.phpt: skip if gd lacks BMP support
  I don't actually know how to remove BMP support from libgd, but PHP
  has a ./configure test for it, so we should probably treat it as
  optional.

Closes GH-12019
2024-02-26 13:59:21 +01:00
Niels Dossche
035a5fdf8c
Add LIBXML_RECOVER (#13504)
Setting the recovery option by using a hardcoded value (1) worked
already for SimpleXML. For DOM, a small change is necessary because
otherwise the recover field overwrites the recovery option.

From a quick search on GitHub [1] it looks like this won't clash with
existing PHP code as no one seems to define (or use) a constant with
such a name.

[1] https://github.com/search?q=LIBXML_RECOVER+language%3APHP&type=code&l=PHP
2024-02-25 21:03:37 +01:00
Niels Dossche
205c8b642c [ci skip] NEWS and UPGRADING for DOMXPath::quote()
See commit 2f9320c00f.
2024-02-22 20:32:33 +01:00
Saki Takamachi
d29951891a
NEWS / UPGRADING 2024-02-23 01:12:34 +09:00
David CARLIER
9a3a4b5ba2
ext/intl: IntlDateFormatter class removing redundant error message info. (#13465)
Also correcting new IntlChar class constants typos.
2024-02-21 23:23:09 +00:00
David Carlier
75c4a6fe33 [ci skip] NEWS typo 2024-02-21 16:32:27 +00:00
David Carlier
8bc34dd1bf [ci skip] NEWS/UPGRADING 2024-02-21 16:24:27 +00:00
Ayesh Karunaratne
ba0f9fb501
ext/curl: Add feature_info assoc array to curl_version() (#13439)
The `phpinfo()` section of the Curl extension lists individual features
supported by the particular ext-Curl + libcurl build. However, the
`curl_version()` function return values do not indicate the same level of
details.

`curl_version()` has a `protocols` key that returns an array of all protocols
supported by the build. But the `features` key is a bitmask of all the features.
Checking the availability of certain feature requires knowing the corresponding
`CURL_VERSION` constant, and checking the availability of the constant and a
bitmask check for it in the `features` value.

For example, to determine HTTP2 support, it requires evaluating:

```php
defined('CURL_VERSION_HTTP2') && (curl_version()['features'] & CURL_VERSION_HTTP2 === CURL_VERSION_HTTP2)
```

To make feature availability checks more intuitive, this adds a new
`feature_list` key to `curl_version()` output array.

With it, checking for individual features availability is easier, and does
not require inspecting the availability of the `CURL_VERSION` constant and
the `features` key.

```php
!empty(curl_version()['feature_list']['HTTP2']);
```
2024-02-21 00:46:22 +00:00
Niels Dossche
3ab7aa001f Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Workaround ZTS persistent resource crashes (PHP 8.3 and lower)
2024-02-20 21:25:06 +01:00
Niels Dossche
2f605820a4 Workaround ZTS persistent resource crashes (PHP 8.3 and lower)
For master (8.4-dev) I merged GH-13381. But that PR changes public API
of TSRM, so cannot be used on lower branches.

This patch is a safe workaround for the issue, in combination with a
pre-existing fix using `ifdef ZTS + if (module_started)` inside pgsql
and odbc. The idea is to delay unloading modules until the persistent
resources are destroyed. This will keep the destructor code accessible
in memory.

This is not a proper fix on its own, because we still need the
workaround of not accessing globals after module destruction.
The proper fix is in master.

Closes GH-13388.
2024-02-20 21:24:43 +01:00
Kamil Tekiela
1d45357409
Tidy up UT and add NEWS entry 2024-02-18 12:47:30 +01:00
Niels Dossche
ae5beff61b
Upgrade bundled pcre2lib to 10.43 (#13413) 2024-02-17 14:15:04 +01:00
Jorg Adam Sowa
492b9e09e9
Add entry on return type of long2ip to NEWS (#13408)
[skip ci] add entry on return type of long2ip to NEWS and to UPGRADING.
2024-02-16 17:31:21 +00:00
Arnaud Le Blanc
2065829074 [ci skip] NEWS 2024-02-16 12:50:10 +01:00
Steve Wall
f6016c702f ext/ldap: Add LDAP_OPT_X_TLS_PROTOCOL_MAX and LDAP_OPT_X_TLS_PROTOCOL_TLS1_3
close GH-13405.
2024-02-15 21:43:46 +00:00
Niels Dossche
e71b597f4d Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13344: finfo::buffer(): Failed identify data 0:(null)
2024-02-13 21:15:37 +01:00
Niels Dossche
c2b671cb1b Fix GH-13344: finfo::buffer(): Failed identify data 0:(null)
Credits to ranvis for finding the upstream commit that fixes the issue.

This backports 029b82459e

Closes GH-13370.
2024-02-13 21:13:43 +01:00
Niels Dossche
b7c5813c98
Update libmagic to 5.45 (#13369)
* Update libmagic to 5.45

This also cleans up magicdata.patch: changes that are already in upstream file
were removed from that patch file.

There are five (expected) test output changes.
All these were also checked with the file command.

  - bug77961.phpt changes because there's now an early error-return in the
    `if (ts == FILE_BADSIZE) {` branch.
  - cve-2014-1943.phpt and cve-2014-1943-mb.phpt change because now the crafted
    data is recognised as a simh file.
  - bug71434.phpt now properly recognises it as a Python file.
  - ext/fileinfo/tests/finfo_file_basic.phpt more specific mime type.

* Adjust memory requirement for s390x fileinfo run

The larger database causes a higher memory usage.
Similar to 962c082a5b.

* [ci skip] NEWS
2024-02-13 21:11:57 +01:00
Niels Dossche
ca60912c8f Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fixed not to set CR_MALFORMED_PACKET to error if CR_SERVER_GONE_ERROR is already set
2024-02-10 14:05:19 +01:00
Saki Takamachi
199e48b567 Fixed not to set CR_MALFORMED_PACKET to error if CR_SERVER_GONE_ERROR is already set
Closes GH-11951.
2024-02-10 14:04:49 +01:00
haszi
3ce7bf2a77
Clear handler status flag in handler init
Closes GH-13087
2024-02-09 12:00:56 +00:00
David Carlier
a9c01b92b2 Merge branch 'PHP-8.2' into PHP-8.3 2024-02-08 22:42:19 +00:00
George Barbarosie
452e008f4f Fix GH-13354: ext/pgsql: pg_execute, pg_send_query_params and_send_execute null value by reference.
For these, when passing null values by refence, queries return erroneous values unlike
pg_query_params behaving as expected.

close GH-13355.
2024-02-08 22:42:04 +00:00
Niels Dossche
7319ca479e [ci skip] Fix NEWS date again 2024-02-05 22:55:52 +01:00