Commit Graph

13899 Commits

Author SHA1 Message Date
Ben Ramsey
1862152145
Revert "Fix GH-9296: ksort behaves incorrectly on arrays with mixed keys"
This reverts commit cd1aed8edd, as
discussed on internals (<https://externals.io/message/118483>).
2022-08-30 09:13:46 -05:00
Jakub Zelenka
bf97b3649d
Merge branch 'PHP-8.0' into PHP-8.1 2022-08-29 22:33:02 +01:00
Jakub Zelenka
3503b1daa2
Fix bug #77780: "Headers already sent" when previous connection was aborted
This change primarily splits SAPI deactivation to module and destroy
parts. The reason is that currently some SAPIs might bail out
on deactivation. One of those SAPI is PHP-FPM that can bail out on
request end if for example the connection is closed by the client
(web sever). The problem is that in such case the resources are not
freed and some values reset. The most visible impact can have not
resetting the PG(headers_sent) which can cause erorrs in the next
request. One such issue is described in #77780 bug which this fixes
and is also cover by a test in this commit. It seems reasonable
to separate deactivation and destroying of the resource which means
that the bail out will not impact it.
2022-08-29 22:25:53 +01:00
Jakub Zelenka
be45f540ee
Merge branch 'PHP-8.0' into PHP-8.1 2022-08-29 14:40:57 +01:00
Dmitry Menshikov
f92505cf24
Fix GH-8885: access.log with stderr writes logs to error_log after reload
This fix allows restoring the the original stderr so the logs are
correctly written.
2022-08-29 14:39:24 +01:00
Christoph M. Becker
725cb4e8ad
Revert "Fix GH-9296: ksort behaves incorrectly on arrays with mixed keys"
This reverts commit cd1aed8edd, as
discussed on internals (<https://externals.io/message/118483>).
2022-08-29 12:41:36 +02:00
Christoph M. Becker
6427c4b858
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9361: Segmentation fault on script exit
2022-08-22 13:00:48 +02:00
Christoph M. Becker
bb341210f5
Fix GH-9361: Segmentation fault on script exit
Using a lot of memory may overflow some `int` calculations; to avoid
that we make sure that the operands are promoted to `size_t`.

This issue has been analyzed by @chschneider.

Closes GH-9379.
2022-08-22 12:59:17 +02:00
Christoph M. Becker
9bd9e9a867
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #79451: DOMDocument->replaceChild on doctype causes double free
2022-08-19 18:13:48 +02:00
NathanFreeman
6027d441c1
Fix #79451: DOMDocument->replaceChild on doctype causes double free
We have to reset intSubset if replacing doctype with another doctype node.

Closes GH-9201.
Closes GH-9376.
2022-08-19 18:10:06 +02:00
George Peter Banyard
eb8ea14c66 Merge branch 'PHP-8.0' into PHP-8.1 2022-08-19 13:57:19 +01:00
George Peter Banyard
d6831e9a5c Revert Fixed bug #79451
The fix for 8.1 and above is not identical and I don't know how to fix without breaking the whole build apparently
2022-08-19 13:54:54 +01:00
George Peter Banyard
c36a1ea1ae Merge branch 'PHP-8.0' into PHP-8.1 2022-08-19 12:52:58 +01:00
Tim Starling
ba029fce68 Fix GH-9323: crash when the VM enters userspace code via the GC
Closes GH-9323
2022-08-19 12:50:02 +01:00
NathanFreeman
1d4300d870 Fix bug #79451: Using DOMDocument->replaceChild on doctype causes double free
Closes GH-9201
2022-08-19 12:46:23 +01:00
Christoph M. Becker
5d196d9e7c
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9316: $http_response_header is wrong for long status line
2022-08-18 12:30:45 +02:00
Christoph M. Becker
72da418719
Fix GH-9316: $http_response_header is wrong for long status line
While the reason-phrase in a HTTP response status line is usually
short, there is no actual limit specified by the RFCs.  As such, we
must not assume that the line fits into the buffer (which is currently
128 bytes large).

Since there is no real need to present the complete status line, we
simply read and discard the rest of a long line.

Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>

Closes GH-9319.
2022-08-18 12:27:54 +02:00
Jakub Zelenka
93bed982e8
Merge branch 'PHP-8.0' into PHP-8.1 2022-08-17 19:50:16 +01:00
Jakub Zelenka
84dcf578b1
Fix GH-9339: OpenSSL oid_file path check warning contains uninitialized path 2022-08-17 19:49:36 +01:00
Gabriel Caruso
7c6316ad1c
Prepare for 8.0.24 2022-08-17 11:56:42 +02:00
Ben Ramsey
7f26661993
PHP-8.1 is now for PHP 8.1.11-dev 2022-08-16 10:45:29 -05:00
Christoph M. Becker
306da80f56
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Correct IntlDateFormatter::formatObject params
2022-08-15 17:58:52 +02:00
Gert de Pagter
05ed47ef12
Correct IntlDateFormatter::formatObject params
Closes GH-9341.
2022-08-15 17:56:34 +02:00
Jakub Zelenka
7f64a8d59f
[skip ci] Add missing NEWS entry for GH-8409 fix to PHP-8.1 branch (skip-ci) 2022-08-14 14:18:28 +01:00
twosee
b8d07451d4
Re-fix GH-8409: SSL handshake timeout persistent connections hanging
This fix is another solution to replace d0527427be, use zend_try and zend_catch to make sure persistent stream will be released when error occurred.

Closes GH-9332.
2022-08-14 20:13:36 +08:00
Jakub Zelenka
897ca85d33
Revert "Fix GH-8409: SSL handshake timeout persistent connections hanging"
This reverts commit d0527427be.

This patch makes Swoole/Swow can not work anymore, because Coroutine will yield to another one during socket operation, EG(record_errors) assertion will always fail, and zend_begin_record_errors() was only used during compile time before.
Note: zend_emit_recorded_errors() and the typo fix are reserved.
2022-08-14 19:41:06 +08:00
Jakub Zelenka
d0527427be
Fix GH-8409: SSL handshake timeout persistent connections hanging
This is not actually related to SSL handshake but stream socket creation
which does not clean errors if the error handler is set. This fix
prevents emitting errors until the stream is freed.
2022-08-12 17:09:24 +01:00
Christoph M. Becker
71c22efae7
Fix GH-9309: Segfault when connection is used after imap_close()
We actually need to check whether `php_imap_object.imap_stream` is
`NULL` to detect that the connection has already been closed.

Closes GH-9313.
2022-08-12 16:24:30 +02:00
Christoph M. Becker
7908aae30c
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9296: `ksort` behaves incorrectly on arrays with mixed keys
2022-08-12 11:36:24 +02:00
Denis Vaksman
cd1aed8edd
Fix GH-9296: ksort behaves incorrectly on arrays with mixed keys
The comparator function used at ksort in SORT_REGULAR mode
need to be consistent with basic comparison rules. These rules
were changed in PHP-8.0 for numeric strings, but comparator
used at ksort kept the old behaviour. It leads to inconsistent
situations, when after ksort the first key is GREATER than some
of the next ones by according to the basic comparison operators.

Closes GH-9293.
2022-08-12 11:32:23 +02:00
Michael Olšavský
0709578517
Fix GH-9266: GC root buffer keeps growing when dtors are present
Do not reset cleared count on GC rerun.

Closes GH-9265.
2022-08-09 14:16:11 +02:00
Jakub Zelenka
c9fa98a174
Merge branch 'PHP-8.0' into PHP-8.1 2022-08-07 14:21:39 +01:00
Jakub Zelenka
d9ff5e079f
Fix GH-8472: stream_socket_accept result may have incorrect metadata 2022-08-07 14:17:38 +01:00
zeriyoshi
2d777466c0 Merge remote-tracking branch 'upstream/PHP-8.0' into PHP-8.1 2022-08-05 00:06:04 +09:00
zeriyoshi
1ce2b56227 [CI skip] update NEWS 2022-08-05 00:05:12 +09:00
Go Kudo
3725717de1
Remove ZEND_DVAL_TO_LVAL_CAST_OK (#9215)
* Remove ZEND_DVAL_TO_LVAL_CAST_OK
As far as I can see, this operation should always use the _slow method, and the results seem to be wrong when ZEND_DVAL_TO_LVAL_CAST_OK is enabled.

* update NEWS
2022-08-04 23:56:19 +09:00
Gabriel Caruso
a08ffc7052
[ci-skip] Fix for bug #80047 was included in previous release
We are removing the entry in 8.0.23, as the fix was included
in the 8.0.22 release. Given that an entry already exists, we
are just deleting extra lines.
2022-08-02 10:32:06 +02:00
Arnaud Le Blanc
832e0ef31f [ci skip] NEWS 2022-08-01 19:32:02 +02:00
Ilija Tovilo
565a416e87
Fix attribute target validation on fake closures
Fixes GH-8982
Closes GH-9173
2022-07-29 12:14:44 +02:00
Derick Rethans
a0c01f385c Add test case for GH-9601: DateInterval 1.5s added to DateTimeInterface is rounded down since PHP 8.1.0 2022-07-28 11:55:35 +01:00
Derick Rethans
001e7dbb04 Fixed bug #80047 (DatePeriod doesn't warn with custom DateTimeImmutable) 2022-07-28 10:28:10 +01:00
Christoph M. Becker
ca84d06bbc
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9032: SQLite3 authorizer crashes on NULL values
2022-07-27 13:06:15 +02:00
Christoph M. Becker
8ed21a89f3
Fix GH-9032: SQLite3 authorizer crashes on NULL values
The arguments 3 to 6 of the authorizer callback may be `NULL`[1], and
we have to properly deal with that.  Instead of causing a segfault, we
deny authorization, which is still better than a crash, and apparently,
we cannot do better anyway.

[1] <https://www.sqlite.org/c3ref/set_authorizer.html>

Closes GH-9040.
2022-07-27 12:49:16 +02:00
Christoph M. Becker
cf1664e91d
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9155: dba_open("non-existing", "c-", "flatfile") segfaults
2022-07-27 12:13:32 +02:00
Christoph M. Becker
a442e29485
Fix GH-9155: dba_open("non-existing", "c-", "flatfile") segfaults
We must not assume that the lock file has been opened.

Closes GH-9156.
2022-07-27 12:08:36 +02:00
Christoph M. Becker
4834cfea1a
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9033: Loading blacklist file can fail due to negative length
2022-07-25 16:32:18 +02:00
Christoph M. Becker
35fd97c3c9
Fix GH-9033: Loading blacklist file can fail due to negative length
If the blacklist file contains a line with a single double-quote, we
called `zend_strndup(pbuf, -1)` what causes an unnecessary bail out;
instead we just ignore that line.

If the blacklist file contains an empty line, we may have caused an OOB
read; instead we just ignore that line.

Closes GH-9036.
2022-07-25 16:30:19 +02:00
Derick Rethans
7831a1cae6 Add test case for GH-8964 2022-07-22 13:06:32 +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
3edf93d7ee Update NEWS 2022-07-21 12:34:45 +01: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
Patrick Allaert
9af3327176
PHP-8.1 is now for PHP 8.1.10-dev 2022-07-20 06:48:52 +02: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
Gabriel Caruso
a670d2be74
Prepare for PHP 8.0.23 2022-07-19 10:31:08 +02: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
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
4b38779a48 [ci skip] NEWS 2022-07-18 12:35:24 +02: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
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
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
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
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
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
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
Ben Ramsey
6c29ac3d11
Move NEWS entry to PHP 8.1.8 2022-07-05 16:20:23 -05:00
Stanislav Malyshev
13dcd219a1 [ci skip] Update news 2022-07-05 01:08:14 -06: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
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
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
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
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
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
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
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
a8497cb8fe
[ci skip] Fix NEWS format 2022-06-17 19:34: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
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
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
Remi Collet
198f3f509d
[ci skip] missing CVE 2022-06-10 14:28:31 +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
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
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
Stanislav Malyshev
d1be9369ad Update NEWS 2022-06-06 01:00:38 -06: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
Sara Golemon
01d84545e7
Verify internal types before abandoning call frame
An internal caller executing a builtin method with
a static return type will lose context if we drop
our frame before performing the validation.
2022-06-01 00:51:08 +00:00
Ilija Tovilo
93fc88e808
Fix Enum::from/tryFrom memory leak in JIT for internal enums
when passing an int to a string enum. Previously, the int was coerced to
a string. The JIT skips parameter clean up when unnecessary. In this
particular case, passing int to from(int|string) normally doesn't cause
a coercion so no dtor for the $value zval is generated.

To circumvent this we avoid coersion by explicitly allowing ints and
converting them to strings ourselves. Then we can free it appropriately.

See GH-8518
Closes GH-8633
2022-05-28 10:51:17 +02:00
Derick Rethans
38669f5df3 Update NEWS in 8.1 too 2022-05-27 14:44:35 +01:00
Derick Rethans
d5e57268a9 Fixed bug #78139 (timezone_open accepts invalid timezone string argument). 2022-05-27 14:43:04 +01:00
Derick Rethans
f36ccdb2ed Update NEWS in 8.1 too 2022-05-27 14:28:56 +01:00
Derick Rethans
d8590b1aff Merge remote-tracking branch 'derickr/bug74671-dst-c-format' into PHP-8.0 2022-05-27 14:23:38 +01:00
Arnaud Le Blanc
badda52a25 [ci skip] NEWS 2022-05-27 13:19:19 +02:00
Derick Rethans
a04eccb294 Merge branch 'PHP-8.0' into PHP-8.1 2022-05-26 15:19:27 +01:00
Derick Rethans
172b7345b1 Update NEWS 2022-05-26 15:18:33 +01:00
Chen
040a37d3f1
Add IBT support for fiber
Indirect Branch Tracking (IBT) is part of Intel's Control-Flow
Enforcement Technology (CET). IBT is hardware based, forward edge
Control-Flow-Integrity mechanism where any indirect CALL/JMP must target
an ENDBR instruction or suffer #CP.

This commit adds IBT support for fiber:
1. Add endbr32/64 in assembly
2. Inform compiler jump_fcontext may return via indirect branch

Furthermore:
gcc support CET since v8.1 and set it to default since gcc 11. That is,
the ELF header of sapi/cli/php has a property named IBT. However, such
property is lost since PHP8.1 because the assembly introduced by Fiber.
This commit also fixes this.

Closes GH-8339

Signed-off-by: Chen, Hu <hu1.chen@intel.com>
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
2022-05-25 13:42:31 -05:00
Ben Ramsey
2236b2d211
[ci skip] Remove RC1 from 8.1.7 in the NEWS file 2022-05-25 12:00:01 -05:00
Ben Ramsey
cc599c299e
Update NEWS with mb_detect_encoding changes 2022-05-25 11:52:27 -05:00
Patrick Allaert
3b6ee1eb19
Bump for 8.1.8-dev 2022-05-25 00:54:00 +02:00
Sara Golemon
e05897fe5e
Bump for 8.0.21 2022-05-24 18:51:01 +00:00
Christoph M. Becker
5017240ccc
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix pcntl Haiku build
2022-05-24 15:00:47 +02:00
David Carlier
e33de9dda8
Fix pcntl Haiku build
guarding SIGIO constant.

Closes GH-8612.
2022-05-24 14:59:50 +02:00
Christoph M. Becker
ee9a3fa762
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-8538: SoapClient may strip parts of nmtokens
2022-05-23 16:51:32 +02:00
Christoph M. Becker
2a13304b2e
Fix GH-8538: SoapClient may strip parts of nmtokens
When stripping the namespace prefix, we can assume that this does not
contain any colons, while the rest of the name may contain colons.
Hence we must not use `strrchr()` but rather `strchr()` instead.

Closes GH-8543.
2022-05-23 16:49:12 +02:00
Ilija Tovilo
c71e75bb11
[skip ci] Add NEWS entry 2022-05-22 23:29:32 +02:00
Ilija Tovilo
f0480eb4de
Fix undefined behavior in php_set_inet6_addr
Postfix `++` on `NULL` is undefined behavior

Closes GH-8607
2022-05-22 23:23:47 +02:00
Derick Rethans
008016b536 Fixed bug #81565 (date parsing fails when provided with timezones including seconds) 2022-05-20 13:18:43 +01:00