1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00
Commit Graph

6095 Commits

Author SHA1 Message Date
Gina Peter Banyard e0f24ab3e3 Revert php_output_stack_* signature change
This was unintentional and meant to be done in a follow-up PR
2024-04-19 13:44:21 +01:00
Gina Peter Banyard 2447cb25c6 main/output.c: Refine int return type to bool or zend_result (#13997) 2024-04-19 10:46:40 +01:00
Arnaud Le Blanc 46b6ad6dae Inline GDB scripts in the PHP binary (#13600)
This inlines .gdbinit and php_gdb.py in the .debug_gdb_scripts section of the PHP binary so that GDB can auto-load them regardless of the current directory or the availability of the PHP source code (albeit some functionalities of php_gdb.py currently rely on the source being available).
2024-04-16 15:10:01 +02:00
Niels Dossche 584a7b8e78 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13931: Applying zero offset to null pointer in Zend/zend_opcode.c
2024-04-15 19:40:08 +02:00
Niels Dossche 550e0ceb79 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13931: Applying zero offset to null pointer in Zend/zend_opcode.c
2024-04-15 19:39:59 +02:00
Niels Dossche c3acfb1b57 Fix GH-13931: Applying zero offset to null pointer in Zend/zend_opcode.c
In the test cases, the compiler bails out due to a fatal error.
The data structures used by the compiler will contain stale values.
In particular, for the test case CG(loop_var_stack) will contain data.
The next compilation will incorrectly use elements from the previous
stack.
To solve this, we reset part of the compiler data structures.
We don't do a full re-initialization via init_compiler() because that will
also reset streams and resources.

Closes GH-13938.
2024-04-15 19:39:05 +02:00
Jakub Zelenka ce4c8ab412 Merge branch 'PHP-8.3' 2024-04-14 14:27:49 +01:00
Jakub Zelenka 4dad74f250 Merge branch 'PHP-8.2' into PHP-8.3 2024-04-14 14:27:05 +01:00
Damian Wójcik 8421cfda61 Fix file_get_contents() on Windows fails with "errno=22 Invalid argument"
Closes GH-13948
2024-04-14 14:26:10 +01:00
Eric Mann 67fc53e1be PHP-8.3 is now for PHP 8.3.7-dev 2024-04-10 08:45:14 -07:00
Ben Ramsey 7ca4300db8 Merge branch 'PHP-8.3' 2024-04-09 23:55:11 -05:00
Ben Ramsey 3d9941fd1e Merge branch 'PHP-8.2' into PHP-8.3 2024-04-09 23:49:53 -05:00
Ben Ramsey a9ffc447a4 Merge branch 'PHP-8.1' into PHP-8.2 2024-04-09 23:49:31 -05:00
Niels Dossche 093c08af25 Fix GHSA-wpj3-hf5j-x4v4: __Host-/__Secure- cookie bypass due to partial CVE-2022-31629 fix
The check happened too early as later code paths may perform more
mangling rules. Move the check downwards right before adding the actual
variable.
2024-04-09 23:37:06 -05:00
Niels Dossche ae5220aed6 Avoid call to php_socket_errno() if possible (#13909)
This call is only necessary if ret < 0.
Note that I also had to reoder the checks for EWOULDBLOCK, EMSGSIZE, EAGAIN
to avoid a false positive GCC warning about a duplicate condition
(EAGAIN == EWOULDBLOCK on my system).
2024-04-08 19:53:01 +02:00
Arnaud Le Blanc 345580c5e8 Merge branch 'PHP-8.3'
* PHP-8.3:
  [ci skip] NEWS
  [ci skip] NEWS
  Fix cookie_seek_function_t signature under musl (#13890)
2024-04-08 15:03:37 +02:00
Arnaud Le Blanc 618eb3d468 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [ci skip] NEWS
  Fix cookie_seek_function_t signature under musl (#13890)
2024-04-08 15:02:32 +02:00
Arnaud Le Blanc 577b8ae422 Fix cookie_seek_function_t signature under musl (#13890)
Fixes GH-11678
2024-04-08 14:58:12 +02:00
Niels Dossche b9a2533cb3 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix gcc-14 Wcalloc-transposed-args warnings
2024-04-01 20:34:44 +02:00
Niels Dossche e34c86ce1a Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix gcc-14 Wcalloc-transposed-args warnings
2024-04-01 20:34:37 +02:00
Cristian Rodríguez 18d70db091 Fix gcc-14 Wcalloc-transposed-args warnings
gcc-14 and later warns of inverted arguments in calloc or
calloc-like __alloc_size__ annotated functions.

Closes GH-13818.
2024-04-01 20:34:14 +02:00
Jakub Zelenka 894e17c139 Merge branch 'PHP-8.3' 2024-03-29 16:09:48 +00:00
Jakub Zelenka caec2b6186 Merge branch 'PHP-8.2' into PHP-8.3 2024-03-29 16:09:09 +00:00
Jakub Zelenka c087398cc2 Fix GH-13264: Part 1 - Memory leak on filter failure
Closes GH-13790
2024-03-29 16:06:49 +00:00
Eric Mann 9381129d1b PHP-8.3 is now for PHP 8.3.6-dev 2024-03-26 09:08:14 -07:00
Pierrick Charron 7942268899 PHP-8.2 is now for PHP 8.2.19-dev 2024-03-26 08:49:44 -04:00
Máté Kocsis 5bb03158b6 Add the last few remaining constants to stubs (#13751)
Basically all constants are now declared via stubs. The rest of the constants are either deprecated (`SID` or `MHASH_*`) or out of interest (`__COMPILER_HALT_OFFSET__` and `PHP_CLI_PROCESS_TITLE`).
2024-03-19 08:20:33 +01:00
Peter Kokot d2635b10b4 Remove unused php_std_auto_global_callback() (#13656)
Introduced in 4e55747a2b but not used in
current code. There was previous removal attempt via
afa4e41c2f but looks like it didn't make
it into the master branch at that point.
2024-03-10 18:05:51 +01:00
Jakub Zelenka cc953e5ebc Merge branch 'PHP-8.3' 2024-03-09 19:59:39 +00:00
Jakub Zelenka 4612bb77fb Merge branch 'PHP-8.2' into PHP-8.3 2024-03-09 19:59:06 +00:00
divinity76 2343791aff Fix GH-13203: file_put_contents fail on strings over 4GB on Windows
Closes GH-13205
2024-03-09 19:58:28 +00:00
Jakub Zelenka 47dca339a4 PHP-8.3 is now for PHP-8.3.5-dev 2024-02-28 11:46:49 +00:00
Sergey Panteleev e1a8ebd61b PHP-8.2 is now for PHP 8.2.18-dev 2024-02-27 17:26:44 +03:00
Jorg Sowa 9c4beac8d3 Remove inet_aton
This removes the deprecated inet_aton and its Windows implementation.
The inet_aton can be replaced with platform agnostic inet_pton.

Closes GH-13479
2024-02-23 23:16:43 +01:00
Jorg Adam Sowa e630aacf79 Remove HAVE_INET_PTON (#13410) 2024-02-21 00:43:56 +00:00
Máté Kocsis 10957e498c Do not generate frameless info items when func info generation is disabled
While here, I fixed newlines around arginfo and function entry generation. Previously, newlines were repeated.
2024-02-18 11:39:00 +01:00
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