Commit Graph

13959 Commits

Author SHA1 Message Date
Derick Rethans
b1575f996c Merge branch 'PHP-8.1' 2022-07-22 13:08:11 +01:00
Derick Rethans
7831a1cae6 Add test case for GH-8964 2022-07-22 13:06:32 +01:00
Tim Düsterhus
c5f9b2f292
[ci skip] Fix version of NEWS entry
see 133b9b08da
2022-07-22 09:06:12 +02:00
Go Kudo
133b9b08da
Avoid signed integer overflow in php_random_range() (#9066) 2022-07-22 10:57:32 +09:00
Tim Düsterhus
dfbe96489d [ci skip] Add "segmentation fault if user engine throws" to NEWS
see GH-9055
2022-07-21 19:32:01 +02:00
George Peter Banyard
f60f6be66b
Update NEWS 2022-07-21 14:10:31 +01:00
George Peter Banyard
6cdfaf97e0
Update NEWS 2022-07-21 14:09:27 +01:00
George Peter Banyard
5b83b3a933
Fix memory leak in LMDB driver 2022-07-21 14:05:48 +01:00
Derick Rethans
1c8e566fb5 Update NEWS 2022-07-21 12:35:13 +01:00
Derick Rethans
3edf93d7ee Update NEWS 2022-07-21 12:34:45 +01:00
Christoph M. Becker
8487d8fa91
Fix GH-9067: random extension is not thread safe
For thread-safety, we need to initialize global variables in GINIT (or
RINIT), but not in MINIT.

Closes GH-9070.
2022-07-21 12:53:07 +02:00
Christoph M. Becker
c2bdaa48e1
Fix GH-9008: mb_detect_encoding(): wrong results with null $encodings
Passing `null` to `$encodings` is supposed to behave like passing the
result of `mb_detect_order()`.  Therefore, we need to remove the non-
encodings from the `elist` in this case as well.  Thus, we duplicate
the global `elist`, so we can modify it.

Closes GH-9063.
2022-07-20 16:58:55 +02:00
Christoph M. Becker
d430652935
Fix --CGI-- support of run-tests.php
The `--CGI--` section is supposed to be just a marker, and to be empty
as such.  However, a previous refactoring[1] broke that.

[1] <9140c9038a>

Closes GH-9061.
2022-07-20 14:41:28 +02:00
David CARLIER
1977ef92de opcache find best candidate near .text segment for large maps on FreeBSD.
Follow up on #8890 using similar workflow, we go through the php binary mapping per address boundaries.

Closes #8908.
2022-07-20 09:15:37 +01:00
Patrick Allaert
9af3327176
PHP-8.1 is now for PHP 8.1.10-dev 2022-07-20 06:48:52 +02:00
Pierrick Charron
8225e419e0
[ci skip] Update NEWS for PHP 8.2.0 beta2 2022-07-19 12:26:43 -04:00
Christoph M. Becker
32d55f7422
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9017: php_stream_sock_open_from_socket could return NULL
2022-07-19 17:07:27 +02:00
Heiko Weber
3b7babf9b3
Fix GH-9017: php_stream_sock_open_from_socket could return NULL
Closes GH-9020.
2022-07-19 17:06:02 +02:00
Tim Düsterhus
7ae7df5b46
RFC: Make the iterator_*() family accept all iterables (#8819)
https://wiki.php.net/rfc/iterator_xyz_accept_array
2022-07-19 16:46:32 +02:00
David CARLIER
1416961505 opcache JIT support improvements attempts on macOs.
for cases when shared segments switch b/w R/W/X and R/X bits.

Closes #8382.
2022-07-19 13:41:33 +01:00
dixyes
745cf34ffc
Port standard/crc32 for windows arm64
We also add arm64 support for php_get_windows_cpu().

Closes GH-7703.
2022-07-19 13:23:44 +02:00
Go Kudo
4d8dd8d258
Implement Random Extension
https://wiki.php.net/rfc/rng_extension
https://wiki.php.net/rfc/random_extension_improvement
2022-07-19 10:27:38 +01:00
Gabriel Caruso
a670d2be74
Prepare for PHP 8.0.23 2022-07-19 10:31:08 +02:00
Eric Norris
09237f6126
Update request startup error messages 2022-07-18 23:19:59 +01:00
root
d8fc05c05e
Add FILTER_FLAG_GLOBAL_RANGE to filter Global IPs as per RFC 6890 2022-07-18 17:56:05 +01:00
Mikhail Galanin
ffdf25a270
Add "error_log_mode" setting 2022-07-18 15:41:28 +01:00
David CARLIER
9a8ae45c4b Revert "FPM: Downgrade occasional "failed to acquire scoreboard" warning"
This reverts commit 3040f75f43.
2022-07-18 14:21:54 +01:00
David CARLIER
2a5b2cca85 Revert "FPM: Downgrade occasional "failed to acquire scoreboard" warning"
This reverts commit 3040f75f43.
2022-07-18 14:21:07 +01:00
David Carlier
d0962859f4 Merge branch 'PHP-8.1' 2022-07-18 12:41:24 +01:00
David Carlier
edb173c200 Merge branch 'PHP-8.0' into PHP-8.1 2022-07-18 12:40:47 +01:00
Felix Wiedemann
3040f75f43 FPM: Downgrade occasional "failed to acquire scoreboard" warning
With request timeouts configured, php-fpm occasionally prints the
following warning:

   WARNING: failed to acquire scoreboard

This is happens when php-fpm checks the child scoreboards for timeouts,
but fails to acquire a lock immediately.  As this can (and does) occur
during normal operation, this commit downgrades this to a notice.
Closes #9019.
2022-07-18 12:40:16 +01:00
Arnaud Le Blanc
a6856760c2 [ci skip] NEWS 2022-07-18 12:36:54 +02:00
Arnaud Le Blanc
4b38779a48 [ci skip] NEWS 2022-07-18 12:35:24 +02:00
Jakub Zelenka
0a4a55fd44
Allow to not close stream on rscr dtor in php cli sapi 2022-07-18 10:58:50 +01:00
David Carlier
7e72c3dc8a [ci skip] NEWS typo 2022-07-15 14:53:42 +01:00
David CARLIER
c56e183226 opcache JIT: Adds initial support for macOs Instruments performance measurement.
By default, it is based on the perf_event Linux api, here
we add the proprietary Apple's format using directly its api.

Closes #8914.
2022-07-15 14:27:07 +01:00
David Carlier
7dcd8f854d Merge branch 'PHP-8.1' 2022-07-15 12:49:59 +01:00
David Carlier
f15cfba39b Merge branch 'PHP-8.0' into PHP-8.1 2022-07-15 12:48:09 +01:00
David CARLIER
d830a1f6f0 random extension macOs handling update.
Not such as fix but taking more precautions.
Indeed, the arc4random has two little flaws in this platform,
one already caught upfront by the extension (ie size 0), also
internal use of ccrng_generate which can silently fail in few rare
cases.

Closes #7824.
2022-07-15 12:43:43 +01:00
Cristian Rodríguez
3be9118662 random: whitelist arc4random_buf if glibc
Glibc will soon implement the BSD arc4random API. whitelist its
implementation as safe.

Closes #8984.
2022-07-15 12:33:05 +01:00
Arnaud Le Blanc
2673c1dfa1 [ci skip] NEWS 2022-07-15 13:21:39 +02:00
Arnaud Le Blanc
aadb24e817 Merge branch 'PHP-8.0' into PHP-8.1 2022-07-15 13:15:05 +02:00
Arnaud Le Blanc
20473374fa [ci skip] NEWS 2022-07-15 13:14:17 +02:00
David Carlier
37e214bdc2 Merge branch 'PHP-8.1' 2022-07-14 12:20:59 +01:00
David Carlier
b44a17c02a Merge branch 'PHP-8.0' into PHP-8.1 2022-07-14 12:13:21 +01:00
guoyiyuan
789a37f144 Prevent potential buffer overflow for large value of php_cli_server_workers_max
Fixes #8989.
Closes #9000.
2022-07-14 12:12:25 +01:00
Christoph M. Becker
56804e3221
Fix GH-8750: Can not create VT_ERROR variant type
We add support for creating `VT_ERROR` variants via `__construct()`,
and allow casting to int via `variant_cast()` and `variant_set_type()`.
We do not, however, allow type conversion by other means, to avoid
otherwise easily introduced type confusion.  VB(A) also only allows
explicit type conversion.

We also introduce `DISP_E_PARAMNOTFOUND` which might be the most
important `scode` for this purpose, since this allows to skip optional
parameters in method calls.

Closes GH-8886.
2022-07-12 16:43:14 +02:00
Christoph M. Becker
5365e1d5f1
[ci skip] Fix NEWS entry 2022-07-12 13:43:41 +02:00
Christoph M. Becker
5a459f6783
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8923: error_log on Windows can hold the file write lock
2022-07-12 13:38:35 +02:00
Christoph M. Becker
77e954afaa
Fix GH-8923: error_log on Windows can hold the file write lock
On Windows, closing a file which is locked may not immediately remove
the lock.  The `LockFileEx()` documentation states:

| Therefore, it is recommended that your process explicitly unlock all
| files it has locked when it terminates.

We comply, and also use the macro `LOCK_EX` instead of the magic number
`2`.

Closes GH-8925.
2022-07-12 13:36:20 +02:00
Christoph M. Becker
f22e0df033
[ci skip] Add missing NEWS entry
Cf. 32cceb75bf.
2022-07-12 12:00:08 +02:00
Christoph M. Becker
2fc9e769e8
Fix GH-8576: Bad interpretation of length when char is UTF-8
For columns of type `SQL_TEXT`, Firebird does not properly report the
actual column length, but rather only the maximum column length, so for
multi-byte encodings like UTF-8, such columns may have trailing
spaces.  We work around that by treating such columns as `SQL_VARYING`
when we ask the server to describe the colum, what yields the desired
results.

Given that this is a work-around, and may break code which expects the
results with trailing spaces, we target "master" only.

Closes GH-8926.
2022-07-12 11:57:25 +02:00
Mark Gallagher
327bb21986
FPM: Implement access log filtering
Adds a setting "access.suppress_path" to php-fpm pool configurations
which causes successful GET requests to the specified URIs to be
excluded from the access log. This is to reduce noise caused by
automated health checks.

Requests with response codes outwith the successful range 200 - 299,
requests made with query parameters and requests which have a
Content-Length other than 0 will ignore this setting as a security
precaution.

Closes GH-8174, #80428 [1]

[1] https://bugs.php.net/bug.php?id=80428
2022-07-10 23:21:14 +01:00
David Carlier
185d604d56 NEWS/UPGRADING changes 2022-07-10 21:30:08 +01:00
Arnaud Le Blanc
d217a669fc [ci skip] NEWS 2022-07-10 15:18:51 +02:00
Arnaud Le Blanc
d86141a891 [ci skip] NEWS 2022-07-09 23:00:52 +02:00
David Carlier
5e0b2e537d Merge branch 'PHP-8.0' into PHP-8.1 2022-07-08 17:39:05 +01:00
David Carlier
7c3dfbb845 intl extension, build fix for icu >= 69.x release. ubrk/ucnv_safeClone had been deprecated in favor of ubrk/ucnv_clone which does not use user provided stacks but remain thread safe. 2022-07-08 17:38:31 +01:00
Michael Voříšek
e80925445c Fix GH-8924 str_split of empty string must return empty array
Closes #8945.
2022-07-08 15:49:45 +01:00
Arnaud Le Blanc
4df3dd7679
Reduce memory allocated by var_export, json_encode, serialize, and other (#8902)
smart_str uses an over-allocated string to optimize for append operations. Functions that use smart_str tend to return the over-allocated string directly. This results in unnecessary memory usage, especially for small strings.

The overhead can be up to 231 bytes for strings smaller than that, and 4095 for other strings. This can be avoided for strings smaller than `4096 - zend_string header size - 1` by reallocating the string.

This change introduces `smart_str_trim_to_size()`, and calls it in `smart_str_extract()`. Functions that use `smart_str` are updated to use `smart_str_extract()`.

Fixes GH-8896
2022-07-08 14:47:46 +02:00
David Carlier
9b5a2635d6 Merge branch 'PHP-8.0' into PHP-8.1 2022-07-08 13:12:30 +01:00
Heiko Weber
bd6793372b FPM: Fix possible double free on configuration load failure.
Closes #8948.
2022-07-08 13:11:37 +01:00
Ayesh Karunaratne
d3c86527a5 Update mime-db from 1.45.0 to 1.52.0
Updates the the mime types supported by the built-in PHP server to match the mime types available from upstream `mime-db` database.
This updates the `mime-db` version from `v1.45.0` (released in 2020 Sep) to `v1.52.0` (latest, released in 2022 Feb), and syncs the mime types by running the mime type ingestion script.
2022-07-08 07:39:38 +01:00
David CARLIER
5174ee2353 FPM add routing view global option (for FreeBSD for now).
set the route table FIB id to the sockets created within FPM up to
the max set by the system, avoiding having to use setfib command line.
Closes #8470.
2022-07-08 06:37:47 +01:00
Pierrick Charron
f6de748dcb
[ci skip] Update news 2022-07-07 17:08:20 -04:00
Remi Collet
de202a5f2f
[ci skip] drop NEWS entry for reverted fix 2022-07-07 14:07:11 +02:00
Remi Collet
2e58e9e60f
[ci skip] drop NEWS entry for reverted fix 2022-07-07 14:06:32 +02:00
David Carlier
b22d2bf589 intl extension, build fix for icu >= 71.x release.
ubrk/ucnv_safeClone had been deprecated in favor
of ubrk/ucnv_clone which does not use user provided stacks
but remain thread safe.
Closes #8930.
2022-07-06 18:12:19 +01:00
Ben Ramsey
6c29ac3d11
Move NEWS entry to PHP 8.1.8 2022-07-05 16:20:23 -05:00
Sergey Panteleev
82bcc94bea
[ci skip] Update NEWS for PHP 8.2.0 beta1 2022-07-05 19:09:39 +03:00
Stanislav Malyshev
f0c679c72c fix NEWS 2022-07-05 01:10:34 -06:00
Stanislav Malyshev
718782b8a8 Merge branch 'PHP-8.1' 2022-07-05 01:09:17 -06:00
Stanislav Malyshev
13dcd219a1 [ci skip] Update news 2022-07-05 01:08:14 -06:00
David Carlier
dfbb425295 Use safe_*erealloc* flavor in few places to mitigate possible overflows. 2022-07-04 14:41:04 +01:00
David Carlier
0ad8b64b70 Follow up on #8897 but on master which instead does not use the old custom alloca.
Closes #8905.
2022-07-04 12:56:01 +01:00
George Peter Banyard
1d0c287b90
Abort LMDB transaction whe trying to delete non-existing key 2022-07-01 17:28:36 +01:00
George Peter Banyard
8fce70ae7b
Abort LMDB transaction whe trying to delete non-existing key 2022-07-01 17:26:27 +01:00
Ilija Tovilo
110573726b
Disallow assigning reference to unset readonly property
Closes GH-7942
Closes GH-8188
2022-07-01 12:16:32 +02:00
David CARLIER
1a5414cd98 Revert "Merge branch 'PHP-8.1'"
This reverts commit 6876c202ea, reversing
changes made to a193427333.
2022-07-01 06:31:55 +01:00
David Carlier
6876c202ea Merge branch 'PHP-8.1' 2022-07-01 05:43:21 +01:00
David Carlier
26d63c74be Merge branch 'PHP-8.0' into PHP-8.1 2022-07-01 05:34:05 +01:00
David Carlier
b3569865b3 Fix the crypt sha apis build (with recent clang versions).
Removing the said subtraction by casting instead.
While at it fixing werror level on phpdbg too.

Closes #8897.
2022-07-01 05:33:12 +01:00
David Carlier
a193427333 Adds TCP_CONGESTION socket option for Linux/FreeBSD.
Closes #8824.
2022-06-30 19:43:09 +01:00
Dmitry Stogov
4c37b74c28 Add NEWS entry 2022-06-30 10:52:20 +03:00
Max Kellermann
e2bd3b1e99 main/streams/plain_wrapper: skip lseek(SEEK_CUR) for newly opened files
A file that has just been opened is known to be at offset zero, and
the lseek(SEEK_CUR) system call to determine the current offset can be
skipped.

Closes #8540.
2022-06-29 18:11:01 +01:00
Dmitry Stogov
b7693360cb Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed bug GH-8847 (PHP hanging infinitly at 100% cpu when check php syntaxe of a valid file)
2022-06-29 12:13:03 +03:00
Dmitry Stogov
7cf6f17383 Fixed bug GH-8847 (PHP hanging infinitly at 100% cpu when check php syntaxe of a valid file) 2022-06-29 12:10:46 +03:00
Remi Collet
63c7418b91
[ci skip] NEWS and UPGRADING 2022-06-28 15:19:56 +02:00
David Carlier
3eead43b6d Merge branch 'PHP-8.0' into PHP-8.1 2022-06-27 23:36:05 +01:00
Heiko Weber
325ca31dcf FPM: zlog, fix free on wrong address for message prepend. 2022-06-27 23:34:58 +01:00
Derick Rethans
49a3cc63dd Merge branch 'PHP-8.0' into PHP-8.1 2022-06-25 17:53:26 +01:00
Derick Rethans
973c3f6e24 Fixed #80047: DatePeriod doesn't warn with custom DateTimeImmutable 2022-06-25 17:52:14 +01:00
Ilija Tovilo
44cd74b624
Fix lineno in backtrace of multi-line function calls
Closes GH-8810
Closes GH-8818
2022-06-23 16:10:32 +02:00
Christoph M. Becker
bc8e52f651
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8848: imagecopyresized() error refers to the wrong argument
2022-06-23 15:22:09 +02:00
Christoph M. Becker
9405f43ba9
Fix GH-8848: imagecopyresized() error refers to the wrong argument
Closes GH-8849.
2022-06-23 15:20:49 +02:00
Ben Ramsey
f3b45e74f5
PHP-8.1 is now for PHP 8.1.9-dev 2022-06-21 11:03:50 -05:00
Pierrick Charron
dc322821a4
Update NEWS for PHP 8.2.0 alpha3 2022-06-21 11:22:34 -04:00
Gabriel Caruso
fcd69a4e2b
Prepare for 8.0.22 2022-06-21 11:33:20 +02:00
Christoph M. Becker
b8dee9b3fc
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8827: Intentionally closing std handles no longer possible
2022-06-20 18:04:34 +02:00
Christoph M. Becker
a8437d08a8
Fix GH-8827: Intentionally closing std handles no longer possible
We revert the commits which caused this regression from the PHP-8.0 and
PHP-8.1 branches for now.  We keep it in "master" because of PR #8833
which may offer a proper fix without BC break.
2022-06-20 18:01:02 +02:00
George Peter Banyard
080fde2605
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8563  Different results for seek() on SplFileObject and SplTempFileObject
2022-06-20 12:53:01 +01:00
George Peter Banyard
6f87a5c633
Fix GH-8563 Different results for seek() on SplFileObject and SplTempFileObject
With memory streams if we get a NULL buffer we must not instantiate an empty line
2022-06-20 12:47:37 +01:00
Christoph M. Becker
5f24b85fd2
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix potential use after free in php_binary_init()
2022-06-20 12:02:31 +02:00
Heiko Weber
93a44f8c50
Fix potential use after free in php_binary_init()
Closes GH-8791.
2022-06-20 12:00:50 +02:00
Christoph M. Becker
84b570e3ae
Remove NEWS entries which are not supposed to be there
master/NEWS is not supposed to contain changes done prior to RC, if
these changes are also in lower branches.
2022-06-19 23:18:46 +02:00
Jakub Zelenka
b3e6faed48
Merge branch 'PHP-8.0' into PHP-8.1 2022-06-19 20:09:37 +01:00
Jakub Zelenka
e330f443c9
Fix bug #67764: fpm: syslog.ident does not work 2022-06-19 20:05:49 +01:00
Max Kellermann
2d986310f1 streams/xp_socket: eliminate poll() when MSG_DONTWAIT is available
If there is a zero timeout and MSG_DONTWAIT is available (or the
socket is non-blocking), the poll() call is not necessary, and we can
just call recv() right away.

Before this change:

 poll([{fd=4, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 0 (Timeout)
 poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=4, revents=POLLIN}])
 recvfrom(4, "HTTP/1.1 301 Moved Permanently\r\n"..., 8192, MSG_DONTWAIT, NULL, NULL) = 348
 poll([{fd=4, events=POLLIN|POLLPRI|POLLERR|POLLHUP}], 1, 0) = 1 ([{fd=4, revents=POLLIN}])
 recvfrom(4, "", 1, MSG_PEEK, NULL, NULL) = 0

After this change:

 recvfrom(4, 0x7ffe0cc719a0, 1, MSG_PEEK|MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
 poll([{fd=4, events=POLLIN|POLLERR|POLLHUP}], 1, 60000) = 1 ([{fd=4, revents=POLLIN}])
 recvfrom(4, "HTTP/1.1 301 Moved Permanently\r\n"..., 8192, MSG_DONTWAIT, NULL, NULL) = 348
 recvfrom(4, "", 1, MSG_PEEK|MSG_DONTWAIT, NULL, NULL) = 0

The first poll() is replaced by recvfrom(), and the third poll() is
omitted completely.

ext/openssl/xp_ssl: eliminate poll() when MSG_DONTWAIT is available

If there is a zero timeout and MSG_DONTWAIT is available (or the
socket is non-blocking), the poll() call is not necessary, and we can
just call recv() right away.

Closes GH-8092.
2022-06-18 19:44:32 +01:00
Christoph M. Becker
790be97fc9
Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-8778: Integer arithmethic with large number variants fails
2022-06-18 11:51:52 +02:00
Christoph M. Becker
5869e8a0ca
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8778: Integer arithmethic with large number variants fails
2022-06-18 11:50:14 +02:00
Christoph M. Becker
651e0cc187
Fix GH-8778: Integer arithmethic with large number variants fails
When casting a `variant` to `int`, we need to heed the proper `zval`
type, which is an signed 64bit integer on x64, while `VT_INT` is only
a signed 32bit integer.

Closes GH-8779.
2022-06-18 11:48:49 +02:00
Pierrick Charron
bb010adf29
Merge branch 'PHP-8.0' into PHP-8.1 2022-06-17 19:52:44 -04:00
Pierrick Charron
d84b972658
Fixed CURLOPT_TLSAUTH_TYPE is not treated as a string option. 2022-06-17 19:51:58 -04:00
Christoph M. Becker
cedd4598b2
[ci skip] Merge branch 'PHP-8.1'
* PHP-8.1:
  [ci skip] Fix NEWS format
2022-06-17 19:35:51 +02:00
Christoph M. Becker
a8497cb8fe
[ci skip] Fix NEWS format 2022-06-17 19:34:48 +02:00
tobil4sk
5bb3e233db
Implement #77726: Allow null character in regex patterns
In 8b3c1a3, this was disallowed to fix #55856, which was a security
issue caused by the /e modifier. The fix that was made was the
"Easier fix" as described in the original report.

With this fix, pattern strings are no longer treated as null terminated,
so null characters can be placed inside and matched against with regex
patterns without security problems, so there is no longer a reason to
give the error. Allowing this is consistent with the behaviour of many
other languages, including JavaScript, and thanks to PCRE2[0], it does
not require manually escaping null characters. Now that we can avoid the
error here without the cost of escaping characters, there is really no
need anymore to stray here from the conventional behaviour.

Currently, null characters are still disallowed before the first
delimiter and in the options section at the end of a regex string, but
these error messages have been updated.

[0] Since PCRE2, pattern strings no longer have to be null terminated,
and raw null characters match as normal.

Closes GH-8114.
2022-06-17 19:30:44 +02:00
Christoph M. Becker
98a4ab2266
Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix imagecreatefromavif() memory leak
2022-06-17 17:31:48 +02:00
Christoph M. Becker
036bed01ce
Fix imagecreatefromavif() memory leak
This has been reported as https://github.com/libgd/libgd/issues/831.
We port the respective fix to our bundled libgd.

Closes GH-8812.
2022-06-17 17:30:57 +02:00
Derick Rethans
3fed226e62 Merge branch 'PHP-8.0' into PHP-8.1 2022-06-17 09:36:45 +01:00
Derick Rethans
fe97a5ae19 Merge remote-tracking branch 'derickr/bug77342' into PHP-8.0 2022-06-17 09:36:10 +01:00
David Carlier
75743eaf1b Merge branch 'PHP-8.0' into PHP-8.1 2022-06-16 12:41:51 +01:00
Heiko Weber
a83363e361 FPM: Fix use after free in fpm_evaluate_full_path
Closes #8796.
2022-06-16 12:18:01 +01:00
Remi Collet
e3c5237b4f
NEWS 2022-06-15 15:39:24 +02:00
Remi Collet
26feb2e6f2
NEWS 2022-06-15 15:38:37 +02:00
Pierrick Charron
b9af4335e3
Add new curl_upkeep() function 2022-06-13 18:15:21 -04:00
Pierrick Charron
cec20f615d
Expose new constants from libcurl 7.62 to 7.80 2022-06-13 18:15:21 -04:00
Christoph M. Becker
e7f6acd068
Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix handling of single-key connection strings
2022-06-13 14:44:49 +02:00
Christoph M. Becker
4b8bbfb6db
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix handling of single-key connection strings
2022-06-13 14:43:51 +02:00
Calvin Buckley
445d9502bf
Fix handling of single-key connection strings
A connection string may contain just a single key, but
PHP used ";" as the heuristic to detect if a string was a connection
string versus plain DSN. However, a single-key connection string
would get treated like a DSN name, i.e. "DSN=*LOCAL". This makes it
so that "=" is used, as a connection string must contain a key.

Closes GH-8748.
2022-06-13 14:41:50 +02:00
Christoph M. Becker
4a8c59d661
[ci skip] Add missing NEWS entry 2022-06-13 14:39:00 +02:00
Ilija Tovilo
ddc0b490f7
Allow arbitrary const expressions in backed enums
Closes GH-7821
Closes GH-8190
Closes GH-8418
2022-06-12 22:56:05 +02:00
Ilija Tovilo
5a855ee8d6
Fix GH-8661: Nullsafe in coalesce triggers undefined variable warning
Closes GH-8690
2022-06-12 21:52:14 +02:00
Rowan Tommins
d9f3ca705c
Add deprecation notices to utf8_encode and utf8_decode
Implements initial stage of accepted RFC to remove them:
https://wiki.php.net/rfc/remove_utf8_decode_and_utf8_encode

Tests relating to SOAP and htmlspecialchars seem to have been
using this entirely unnecessarily, so have been fixed.

Closes GH-8726.
2022-06-12 13:37:23 +02:00
Alex Dowad
13479ee2bd Restore backwards-compatible mappings for 0x5C/0x7E in SJIS (for fast conversion filter)
In d62f535caa, the legacy mbstring conversion filters for Shift-JIS
was updated to restore backwards-compatible mappings for 0x5C/0x7E.
Make the same change to the newer fast conversion filters.
2022-06-11 17:09:16 +02:00
David CARLIER
6b02cabc8a Add SO_SETFIB FreeBSD socket option constant.
Aims to set the route table.
Closes #8742.
2022-06-11 13:03:21 +01:00
Remi Collet
8b07921a0c
[ci skip] missing CVE 2022-06-10 14:35:12 +02:00
Remi Collet
62f64141ef
[ci skip] missing CVE 2022-06-10 14:31:48 +02:00
Jakub Zelenka
976cbba76e Merge branch 'PHP-8.0' into PHP-8.1 2022-06-09 19:55:46 +01:00
Jakub Zelenka
b765d4cd41 Fix bug #50293 and #81713: file path checking in OpenSSL functions
It introduces a single function to check file paths passed to OpenSSL
functions. It expands the path, check null bytes and finally does
an open basedir check.
2022-06-09 19:49:59 +01:00
Bob Weinand
34208bfd81 Merge branch 'PHP-8.1' 2022-06-09 13:30:57 +02:00
Nicolas Grekas
96e3a9d316 Fix RC=1 references of declared properties when casting objects to arrays
Fixes GH-8655.
Closes GH-8737.
2022-06-09 13:28:12 +02:00
David Carlier
d677cc13ce Add SO_BPF_EXTENSIONS flag to socket.
Returns the supported bpf extensions from the kernel. Linux only.
Closes GH-8713.
2022-06-08 05:14:57 +01:00
Ben Ramsey
59a3de3786
Fix date on PHP 8.1.7 release 2022-06-07 11:28:41 -05:00
Stanislav Malyshev
a0f479f0b6
Update NEWS 2022-06-07 11:26:04 -05:00
Sergey Panteleev
418f7211f7
Update NEWS for PHP 8.2.0 alpha2 2022-06-07 18:47:44 +03:00
David Carlier
6fe7ff95d9 Implements ancillary data on NetBSD.
With the couple LOCAL_CREDS/SCM_CREDS, in this system we get all the
infos needed (included the process id).
Closes GH-8700.
2022-06-06 23:06:01 +01:00
Remi Collet
c9ec5cfd27
NEWS for GH-8685 2022-06-03 07:55:24 +02:00
Remi Collet
ae8c2bc1ce
NEWS for GH-8685 2022-06-03 07:54:36 +02:00
Yurun
df52903ee0 Closes GH-8626: Fix PDOStatement->execute() failed.
Then execute successfully, errorInfo() information is incorrect
2022-06-02 17:32:43 +01:00
Sam
2ce2aff50e
Better return types for getBackingType (#8687)
The only backing types for Enums are int and string. The proper return type for ReflectionEnum::getBackingType() is thus null|ReflectionNamedType.

See also https://github.com/php/doc-en/pull/1608

Closes GH-8687
2022-06-02 18:13:21 +02:00