1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

5791 Commits

Author SHA1 Message Date
Patrick Allaert b357a4fe71 Update versions and NEWS for PHP 8.1.11 2022-09-28 11:05:55 +02:00
Derick Rethans 6d9a4f3125 Fix #81727: Don't mangle HTTP variable names that clash with ones that have a specific semantic meaning. 2022-09-28 11:01:19 +02:00
Dmitry Stogov f4afa9adc6 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Reset FG(user_stream_current_filename) at the end of request
2022-09-12 11:39:18 +03:00
Dmitry Stogov d0b3096ff0 Reset FG(user_stream_current_filename) at the end of request
Attempt to fix oss-fuzz #51047
2022-09-12 11:38:31 +03:00
Sara Golemon 3d6ed8c852 Catch up dev version numbers 2022-08-30 12:15:27 +00: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
Ben Ramsey 7f26661993 PHP-8.1 is now for PHP 8.1.11-dev 2022-08-16 10:45:29 -05:00
twosee 14d71957ca Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Re-fix GH-8409: SSL handshake timeout persistent connections hanging
2022-08-14 20:14:57 +08: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
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
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 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
Ben Ramsey f3b45e74f5 PHP-8.1 is now for PHP 8.1.9-dev 2022-06-21 11:03:50 -05: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 d9cca443ad Fix strict prototype for php_closelog 2022-06-19 22:56:44 +01: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
Dmitry Stogov 6797f338a7 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix use after free
2022-06-14 12:45:12 +03:00
Dmitry Stogov 0b8e471b3c Fix use after free
This fixes oss-fuzz #47997
2022-06-14 12:44:37 +03: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
Jakub Zelenka 82eea0efc9 Merge branch 'PHP-8.0' into PHP-8.1 2022-05-10 21:39:31 +01:00
Jakub Zelenka 23a2030438 Fix bug #72185: php-fpm writes empty fcgi record causing nginx 502
This issue might happen if there is change of the fcgi stream when
the buffer is full. Then the empty record is created which signals
end of stream which is incorrect.

The actual fix without a test was contributed by GitHub user @loveharmful
in GH-3198.
2022-05-10 21:36:55 +01:00
Arnaud Le Blanc f07a08df5c Fix unregistering ini entries of dynamically loaded extension (#8435)
Fixes GH-8185
2022-05-06 15:25:44 +02:00
Ben Ramsey fb819faa4e Prepare for PHP 8.1.7 2022-04-26 19:22:15 -05:00
Christoph M. Becker e3a5e424f6 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Preserve file-position when php://temp switches to temporary file
2022-04-11 12:44:56 +02:00
Bernd Holzmüller 84c18f9f04 Preserve file-position when php://temp switches to temporary file
Closes GH-8333.
2022-04-11 12:31:22 +02:00
Christoph M. Becker 1bd9890b20 Fix GH-8310: Registry settings are no longer recognized
`zend_file_handle->filename` is a `zend_string*` pointer now, so we
must not cast to `char*` but rather pass the underlying `char*`.

Closes GH-8313.
2022-04-06 17:33:30 +02:00
Christoph M. Becker 43f3745abb Bump version
Apparently, this has been forgotten when PHP 8.0.17RC1 and 8.0.18RC1
had been tagged.

We also fix the version of the fix for GH-8253, which didn't make it
into PHP 8.0.18RC1.
2022-04-05 13:19:02 +02:00
Patrick Allaert 5a899563cc Bump for 8.1.6-dev 2022-03-31 17:37:41 +02:00
Patrick Allaert 723058c3bf Bump for 8.1.5-dev 2022-03-02 17:38:22 +01:00
Bob Weinand 85b669e565 Merge branch 'PHP-8.0' into PHP-8.1 2022-03-01 14:54:09 +01:00
Bob Weinand e6cf583160 Fix GH-8082: Prevent leaking memory on observed transient run_time_caches
This is achieved by tracking the observers on the run_time_cache (with a fixed amount of slots, 2 for each observer).
That way round, if the run_time_cache is freed all associated observer data is as well.

This approach has been chosen, as to avoid any ABI or API breakage.
Future versions may for example choose to provide a hookable API for run_time_cache freeing or similar.
2022-03-01 14:49:44 +01:00
Patrick Allaert 8db7fd8a2a Bump for 8.1.4-dev 2022-02-03 02:21:29 +01:00
Sara Golemon 8a46311dbd Bump for 8.0.17-dev 2022-02-02 23:44:02 +00:00
Remi Collet cdfc4d3596 Fix GH-7883 don't close not open file handle
don't create a stream if file is not open
2022-01-18 14:49:56 +01:00
Christoph M. Becker 8d2ed194bf Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7896: Environment vars may be mangled on Windows
2022-01-17 23:45:49 +01:00
Christoph M. Becker 93a3c71eb4 Fix GH-7896: Environment vars may be mangled on Windows
When bug 77574[1] has been fixed, the fix only catered to variables
retrieved via `getenv()` with a `$varname` passed, but neither to
`getenv()` without arguments nor to the general import of environment
variables into `$_ENV` and `$_SERVER`.  We catch up on this by using
`GetEnvironmentStringsW()` in `_php_import_environment_variables()` and
converting the encoding to whatever had been chosen by the user.

[1] <https://bugs.php.net/bug.php?id=75574>

Closes GH-7928.
2022-01-17 23:44:41 +01:00
Patrick Allaert 4ae75623fd Preparing for 8.1.3-dev 2022-01-04 19:29:41 +01:00
Nikita Popov 26e424465c Fix bug #81598: Use C.UTF-8 as LC_CTYPE locale by default
Unfortunately, libedit is locale based and does not accept UTF-8
input when the C locale is used. This patch switches the default
locale to C.UTF-8 instead (if it is available). This makes libedit
work and I believe it shouldn't affect behavior of single-byte
locale-dependent functions that PHP otherwise uses.

Closes GH-7635.
2021-12-05 21:03:27 +01:00
Patrick Allaert 628670c391 Prepare for 8.1.2 2021-12-02 14:20:36 +01:00
Sara Golemon 999c6f2c5d Bump for 8.0.15 2021-12-02 05:09:07 +00:00
Christoph M. Becker b0823438a9 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #81659: stream_get_contents() may unnecessarily overallocate
2021-11-29 14:50:19 +01:00
Christoph M. Becker f3bd24a200 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #81659: stream_get_contents() may unnecessarily overallocate
2021-11-29 14:48:11 +01:00