1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 00:32:23 +01:00
Commit Graph

6053 Commits

Author SHA1 Message Date
Peter Kokot
25923987b5 Refactor PHP_SOCKADDR_CHECKS (#13406)
Instead of the project macro, the sockaddr_storage and sockaddr.sa_len
can be checked with the AC_CHECK_TYPES and AC_CHECK_MEMBERS by including
the sys/socket.h. Some systems (~1988) didn't include the sys/types.h in
the socket.h (obsolete on current systems).

These macros by default define the HAVE_STRUCT_SOCKADDR_STORAGE and
HAVE_STRUCT_SOCKADDR_SA_LEN.
2024-02-16 13:29:20 +01:00
haszi
3ce7bf2a77 Clear handler status flag in handler init
Closes GH-13087
2024-02-09 12:00:56 +00:00
Peter Kokot
3e237ecfb3 Remove remainings of recent oci extensions removal (#13352)
Following a4d64b2605
2024-02-08 18:04:00 +01:00
Ilija Tovilo
cd66fcc68b Add request_parse_body() function
RFC: https://wiki.php.net/rfc/rfc1867-non-post

This function allows populating the $_POST and $_FILES globals for non-post
requests. This avoids manual parsing of RFC1867 requests.

Fixes #55815
Closes GH-11472
2024-02-08 12:08:07 +01:00
Ilija Tovilo
c149b4f56f Fix missing syntax error message in cli-server router script
Fixes GH-13113
Closes GH-13275
2024-02-07 16:13:08 +01:00
Jakub Zelenka
da6a4e799a Merge branch 'PHP-8.3' 2024-02-04 12:01:09 +00:00
Jakub Zelenka
ae44ab47a7 Merge branch 'PHP-8.2' into PHP-8.3 2024-02-04 12:00:36 +00:00
Jakub Zelenka
bc30ae4f04 Fix bug #75712: getenv in php-fpm should not read $_ENV, $_SERVER
Closes GH-13195
2024-02-04 11:58:18 +00:00
Peter Kokot
1a349ab209 Update PHP 8.3 minor version 2024-01-31 10:55:43 +00:00
Eric Mann
5094a636ae PHP-8.3 is now for PHP-8.3.4-dev 2024-01-30 12:42:45 -08:00
Pierrick Charron
0454f4ade4 PHP-8.2 is now for PHP 8.2.17-dev 2024-01-30 12:43:37 -05:00
Niels Dossche
fe064d7f12 Fix GH-13142: Undefined variable name is shortened when contains \0
Uses the new %S formatter and introduces the necessary changes and
helpers.
2024-01-20 23:49:13 +01:00
Ilija Tovilo
ffc250d245 Add runtime type inference verification
Co-authored-by: Dmitry Stogov <dmitry@zend.com>

Closes GH-12930
2024-01-19 09:29:14 +01:00
Peter Kokot
569da8a064 Remove unused internal_functions file (#13175)
On Windows internal_functions.c file is created from the same template
internal_functions.c.in as in Autotools build system. This was once used
with Microsoft Developer Studio files (1995).
2024-01-17 20:40:58 +01:00
Niels Dossche
23b94cb5a7 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13071: Copying large files using mmap-able source streams may exhaust available memory and fail
2024-01-16 23:53:12 +01:00
Niels Dossche
47454cb771 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13071: Copying large files using mmap-able source streams may exhaust available memory and fail
2024-01-16 23:46:43 +01:00
Niels Dossche
5e9e9c9d51 Fix GH-13071: Copying large files using mmap-able source streams may exhaust available memory and fail
Commit 5cbe5a538c disabled chunking for all writes to streams. However,
user streams have a callback where code is executed on data that is
subject to the memory limit. Therefore, when using large writes or
stream_copy_to_stream/copy the memory limit can easily be hit with large
enough data.

To solve this, we reintroduce chunking for userspace streams.
Users have control over the chunk size, which is neat because
they can improve the performance by setting the chunk size if
that turns out to be a bottleneck.

In an ideal world, we add an option so we can "ask" the stream whether
it "prefers" chunked writes, similar to how we have
php_stream_mmap_supported & friends. However, that cannot be done on
stable branches.

Closes GH-13136.
2024-01-16 23:44:58 +01:00
Niels Dossche
8d5c3e6781 Introduce %S modifier and use it (#13168) 2024-01-16 22:51:02 +01:00
Niels Dossche
4091d2407b Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13097: Anonymous class reference in trigger_error / thrown Exception
2024-01-16 21:06:29 +01:00
Niels Dossche
764360b1b0 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13097: Anonymous class reference in trigger_error / thrown Exception
2024-01-16 21:06:03 +01:00
Niels Dossche
2cde4b2ea4 Fix GH-13097: Anonymous class reference in trigger_error / thrown Exception
Closes GH-13153.
2024-01-16 21:05:04 +01:00
Tim Düsterhus
2b30f18708 Remove unused includes of php_random.h (#13131)
Before this change php_random.h was listed in 146 different *.dep files for a

    env CC=clang ./configure --without-sqlite3 --without-pdo-sqlite

build, after this change it's only listed in 110 of them, preventing uselessly
recompiling those files when working on ext/random, mostly caused by the include
in ext/standard/basic_functions.h.
2024-01-12 18:35:18 +01:00
haszi
90800b62bb Change PHP_ZTS and PHP_DEBUG to bool to match their ZEND equivalents (#13079)
Co-authored-by: haszi <haszika80@gmail.com>
2024-01-07 13:38:26 +00:00
haszi
c1a8cc59cc Add PHP_OUTPUT_HANDLER_PROCESSED constant to stubs 2024-01-04 15:57:12 +01:00
Jakub Zelenka
d33a534863 PHP-8.3 is now for PHP-8.3.3-dev 2024-01-02 15:50:36 +00:00
Peter Kokot
3164a9effb Remove unused in_addr_t type alias (#12994)
The fastcgi code was refactored in
18cf4e0a8a and in_addr_t is no longer
used. The PHP_CHECK_IN_ADDR_T is also obsolete and not recommended way
to discover availability of the type. If needed in the future, the
AC_CHECK_TYPES can be used instead.
2024-01-02 16:41:33 +01:00
Sergey Panteleev
5d79c1b74d PHP-8.2 is now for PHP 8.2.16-dev 2024-01-02 16:42:14 +03:00
Peter Kokot
5b268fa929 Use AC_CHECK_MEMBERS instead of AC_EGREP_HEADER (#13048)
AC_EGREP_* macros are not recommended due to their unreliability in
certain cases, checking for struct member can be done here using the
usual AC_CHECK_MEMBERS instead.

AC_CHECK_MEMBERS macro by default defines constant
HAVE_STRUCT_SOCKADDR_UN_SUN_LEN.
2024-01-02 04:46:28 +01:00
Cristian Rodríguez
927adfb1a6 Use a single version of mempcpy(3) (#12257)
While __php_mempcpy is only used by ext/standard/crypt_sha*, the
mempcpy "pattern" is used everywhere.

This commit removes __php_mempcpy, adds zend_mempcpy and transforms
open-coded parts into function calls.
2023-12-20 15:16:32 +00:00
Jakub Zelenka
d6299206dd Merge branch 'PHP-8.3' 2023-12-15 14:14:15 +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
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