1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Commit Graph

6018 Commits

Author SHA1 Message Date
Ilija Tovilo
a5833577d7 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix in-place modification of filename in php_message_handler_for_zend
2023-11-20 14:13:12 +01: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
David CARLIER
931a8b0739 inet_ntop requirement check at configure time instead (#12700) 2023-11-17 16:01:46 +00:00
Jakub Zelenka
62b2ad4b8a Merge branch 'PHP-8.3' 2023-11-17 13:42:59 +00: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
David Carlier
44f9c226aa following-up on GH-12551: removing inet_ntoa usage
Close GH-12554
2023-11-06 12:05:56 +00:00
Jakub Zelenka
a66c926b68 Merge branch 'PHP-8.3' 2023-11-03 14:08:39 +00: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
96a30882ca Merge branch 'PHP-8.3' 2023-09-24 16:51:35 +01: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
4834e7ede5 Merge branch 'PHP-8.3' 2023-09-24 15:21:10 +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
Peter Kokot
abed8b8e41 Remove _IO_cookie_io_functions_t in favor of cookie_io_functions_t
As noted in glibc, the cookie_io_functions_t should be used instead of
internal _IO_cookie_io_functions_t.

The _IO_cookie_io_functions_t was once used as a convenience for not
having the cookie_io_functions_t available (glibc <=2.1.1) as noted in
67bb9d1ae2.

Check in the build system was also always setting the
COOKIE_IO_FUNCTIONS_T to cookie_io_functions_t due to a typo. There is
unused variable have_IO_cookie_io_functions_t vs.
have_cookie_io_functions_t.

- COOKIE_IO_FUNCTIONS_T removed

Closes GH-12236
2023-09-22 22:31:19 +02:00
Christian Clauss
886bf820c9 [skip ci] Fix typos discovered by codespell (#12228) 2023-09-18 11:07:17 +01:00
Ilija Tovilo
692cea5cbc Use zend_error_noreturn for E_ERROR consistently
To be clear, these already don't return. zend_error_noreturn just hints at this
fact through the ZEND_NORETURN attribute.

Closes GH-12204
2023-09-14 11:44:55 +02: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
8f8f31a16a Merge branch 'PHP-8.3'
* PHP-8.3:
  streams: Checking if a stream is castable should not emit warnings for user defined streams
2023-09-08 13:23:20 +01: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
Máté Kocsis
2fad7cdd60 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-07 10:01:02 +02:00
Pierrick Charron
ad2ac6f05f Prepare for PHP 8.4 2023-08-29 15:25:46 -04:00
Jakub Zelenka
7deb84b7a6 Start PHP 8.4 development cycle 2023-08-29 17:19:01 +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