1
0
mirror of https://github.com/php/php-src.git synced 2026-04-05 15:12:39 +02:00
Commit Graph

6010 Commits

Author SHA1 Message Date
Jakub Zelenka
92e812a324 Update versions for PHP 8.3.2RC1 2024-01-02 15:46:50 +00:00
Jakub Zelenka
1b8be9acf0 Merge branch 'PHP-8.2' into PHP-8.3 2023-12-15 14:13:41 +00:00
Jakub Zelenka
40ccc8ea7e Fix GH-9698: stream_wrapper_register crashes with FFI\CData provided as class
Closes GH-12926
2023-12-15 14:11:56 +00:00
Pierrick Charron
dc3641ea0f PHP-8.2 is now for PHP 8.2.15-dev 2023-12-05 15:01:08 -05:00
Eric Mann
1fdf21fe84 PHP-8.3 is now for PHP 8.3.2-dev 2023-12-05 07:56:55 -08:00
Jakub Zelenka
178d3acf4c PHP 8.3 is now 8.3.1-dev 2023-11-21 14:54:52 +00:00
Ilija Tovilo
05a815399e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix in-place modification of filename in php_message_handler_for_zend
2023-11-20 14:13:06 +01:00
Ilija Tovilo
d8e866da04 Fix in-place modification of filename in php_message_handler_for_zend
php_strip_url_passwd modifies url in-place. We cannot assume from
php_message_handler_for_zend that data is a temporary, modifiable string.

Fixes oss-fuzz #64209
Closes GH-12733
2023-11-20 14:12:25 +01:00
Jakub Zelenka
7abe3fe4c6 Merge branch 'PHP-8.2' into PHP-8.3 2023-11-17 13:41:50 +00:00
Jakub Zelenka
4da89d86ec Fix stream fclose_stdiocast_flush_in_progress type 2023-11-17 13:33:55 +00:00
Jakub Zelenka
6734880ef5 Fix bug #79945: Stream wrappers in imagecreatefrompng causes segfault
Closes GH-12696
2023-11-17 13:26:42 +00:00
Sergey Panteleev
239a26fa90 PHP-8.2 is now for PHP 8.2.14-dev 2023-11-07 17:12:19 +03:00
Jakub Zelenka
e43438544e Merge branch 'PHP-8.2' into PHP-8.3 2023-11-03 14:07:36 +00:00
Jakub Zelenka
e3d1beb0f1 Fix bug #76922: FastCGI terminates conn after FCGI_GET_VALUES
Closes GH-12387
2023-11-03 14:06:36 +00:00
Pierrick Charron
2642a08697 PHP-8.2 is now for PHP 8.2.13-dev 2023-10-10 11:45:26 -04:00
Jakub Zelenka
5e8c992c78 Reduce impact of stream file path check in filestat
Fix for #76857 introduced slight perf regression so this is an attempt
to fix it. The idea is to re-use stream path check from ZendAccelerator
that should be quicker than strstr.

Signed-off-by: Jakub Zelenka <bukka@php.net>
2023-09-24 16:50:01 +01:00
David Carlier
4400eb270f Merge branch 'PHP-8.2' into PHP-8.3 2023-09-24 15:20:24 +01:00
David Carlier
4bfd3459fe Merge branch 'PHP-8.1' into PHP-8.2 2023-09-24 15:19:02 +01:00
David Carlier
d65c80031a Fix GH-12190: stream_context_create with address and port at 0.
Prior to the 8.1 rewrite, inet_aton was used for ipv4 addresses
therefore addresses like `0` passed.
For the bindto's case where both ip and port are set as such, we discard
the address binding.

Close GH-12195
2023-09-24 15:17:53 +01:00
Ben Ramsey
c1cf0026e5 PHP-8.1 is now for PHP 8.1.25-dev 2023-09-12 16:21:51 -05:00
Sergey Panteleev
5c1f746716 PHP-8.2 is now for PHP 8.2.12-dev 2023-09-12 14:53:56 +03:00
Máté Kocsis
58657ff26a Fix type of the PHP_FLOAT_DIG constant
It used to be an int (https://github.com/php/php-src/pull/9616/files#diff-2978fe1c2c45b4eca89dc476376ddc7193bc4e5e7fff0c7d1c465f057b35a5e6L2155) before constant registration was refactored.
2023-09-10 22:31:19 +02:00
George Peter Banyard
d68073c23b streams: Checking if a stream is castable should not emit warnings for user defined streams
Closes GH-10435
2023-09-08 13:22:43 +01:00
Jakub Zelenka
2eb21b0b1e Update API versions and numbers 2023-08-29 17:04:24 +01:00
Jakub Zelenka
ba9650d697 Fix bug #52335 (fseek() on memory stream behavior different then file)
This changes memory stream to allow seeking past end which makes it the
same as seeking on files. It means the position is allowed to be higher
than the string length. The size only increases if data is appended to
the past position. The space between the previous string and position
is filled with zero bytes.

Fixes GH-9441
Closes GH-12058
2023-08-28 13:32:34 +01:00
Niels Dossche
26d6bb3627 Remove useless duplicated call to php_stream_parse_fopen_modes (#12059) 2023-08-27 17:22:23 +02:00
Mikhail Galanin
418cdc0bea Set CLOEXEC on listened/accepted sockets in the FPM children
Closes GH-11708

Co-authored-by: Jakub Zelenka <bukka@php.net>
2023-08-26 15:19:03 +01:00
Cristian Rodríguez
782ffd761b Use a single version of strnlen (#12015)
* Zend: Make zend_strnlen available for use outside zend_compile

* exif: remove local php_strnlen, use zend_strnlen instead

* main: remove local strnlen, use zend_strnlen instead

* phar: remove local strnlen, use zend_strnlen
2023-08-22 17:40:24 +02:00
Pierrick Charron
4467f33e89 PHP-8.2 is now for PHP 8.2.11-dev 2023-08-15 16:08:52 -04:00
Patrick Allaert
6e3f93f2f8 PHP-8.1 is now for PHP 8.1.24-dev 2023-08-15 21:09:58 +02:00
Levi Morrison
0311e60eb4 Add php_version and php_version_id PHPAPI funcs (#11875)
Mostly, extensions will use `PHP_VERSION` and `PHP_VERSION_ID`
respectfully but sometimes they want to grab the version at run-time
rather than at compile-time. For example, extensions which distribute
pre-built binaries may want this.
2023-08-04 15:39:50 -06:00
Ilija Tovilo
127ad70782 Fix open_basedir leak
Fixes oss-fuzz #60741
Closes GH-11780
2023-07-25 17:54:14 +02:00
Ilija Tovilo
b0037eda26 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix use-after-free when unregistering user stream wrapper from itself
2023-07-19 11:20:18 +02:00
Ilija Tovilo
c3ccc363c6 Fix use-after-free when unregistering user stream wrapper from itself
Fixes GH-11735
Closes GH-11737
2023-07-19 11:17:57 +02:00
Ben Ramsey
6e3c520f51 PHP-8.1 is now for PHP-8.1.23-dev 2023-07-18 16:30:49 -05:00
Ilija Tovilo
9bcdf219ec Resolve open_basedir paths on ini update
Closes GH-10987
2023-07-18 14:43:40 +02:00
Sergey Panteleev
796a75f967 PHP-8.2 is now for PHP 8.2.10-dev 2023-07-18 14:02:43 +03:00
Jakub Zelenka
4a5d13e205 Fix GH-11242: Use dynamic buffer for large length in stream mem copy 2023-07-08 11:43:05 +01:00
Niels Dossche
0b2e6bc2b0 Cache d_type in directory entry 2023-07-07 18:02:32 +02:00
Niels Dossche
00c1e7bf0f Reserve less file space if possible in a directory entry
On POSIX systems, we can use the maximum file length instead of maximum
path length. This saves space and time for clearing the memory.
2023-07-07 18:02:17 +02:00
Alexander M. Turek
5d5664f72f [skip ci] Fix typo (#11558) 2023-06-30 12:59:33 +02:00
Sergey Panteleev
884a53f39a PHP-8.2 is now for PHP 8.2.9-dev 2023-06-20 17:25:30 +03:00
Patrick Allaert
6c4b1e0417 PHP-8.1 is now for PHP 8.1.22-dev 2023-06-20 16:07:05 +02:00
Jakub Zelenka
49fbbea2ea Fix GH-10406: fgets on a redis socket connection fails on PHP 8.3
This is an alternative implementation for GH-10406 that resets the
has_buffered_data flag after finishing stream read so it does not impact
other ops->read use like for example php_stream_get_line.

Closes GH-11421
2023-06-11 13:27:00 +01:00
Niels Dossche
d22d0e26dc Implement GH-8641: STREAM_NOTIFY_COMPLETED over HTTP never emitted
This adds support for the completed event. Since the read handler could
be entered twice towards the end of the stream we remember what the eof
flag was before reading so we can emit the completed event when the flag
changes to true.

Closes GH-10505.
2023-06-10 19:47:36 +02:00
George Peter Banyard
d5ad75108e More usage of known zend_str instead of C string (#11381) 2023-06-08 13:03:29 +01:00
George Peter Banyard
13ad8ef40b memory stream: fix [-Wanalyzer-deref-before-check]
|  732 |                 ts->mode = mode && mode[0] == 'r' && mode[1] != '+' ? TEMP_STREAM_READONLY : 0;
    |      |                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~

Although mode is already dereference on line 723 in the call to strlen()
2023-06-02 20:33:20 +01:00
Ben Ramsey
2f2fd06be0 PHP-8.1 is now for PHP 8.1.21-dev 2023-05-23 16:19:16 -05:00
Pierrick Charron
d5f68b50fc PHP-8.2 is now for PHP 8.2.8-dev 2023-05-23 16:56:58 -04:00
iamluc
730f32bad9 Keep the orig_path for xport stream
Closes GH-11113
2023-05-12 15:33:55 +01:00