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

14889 Commits

Author SHA1 Message Date
Niels Dossche d6258d60d6 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix test conflict between copy_variation2-win32-mb.phpt and copy_variation2-win32.phpt
2025-06-09 14:16:32 +02:00
Niels Dossche 186a8116be Fix test conflict between copy_variation2-win32-mb.phpt and copy_variation2-win32.phpt
Closes GH-18809.
2025-06-09 14:16:18 +02:00
Jakub Zelenka 086a470208 Merge branch 'PHP-8.3' into PHP-8.4 2025-06-05 14:10:57 +02:00
Jakub Zelenka 42f6c15186 Fix bug #74796: Requests through http proxy set peer name
This issue happens because http wrapper sets peer_name but then does not
remove so it stays in the context. The fix removes the peer name from
the context after enabling crypto.

In addition to bug #74796, this also fixes bug #76196.

In addition it should be a final fix for those SOAP bugs:

bug #69783
bug #52913
bug #61463
2025-06-05 14:08:28 +02:00
Gina Peter Banyard f47a7e8056 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  tests: Fix expectations
2025-05-31 14:46:13 +01:00
Gina Peter Banyard 7f2299c8eb tests: Fix expectations
Closes GH-18712
2025-05-31 14:45:41 +01:00
Niels Dossche d5515577d5 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Backport fix for GH-17687
2025-05-27 20:42:12 +02:00
Niels Dossche fab0a6d75c Backport fix for GH-17687
Introducing a new attribute macro in lower branches is an ABI break and
not allowed. However, we still need to fix the warnings such that
-Werror builds don't break. So we copy the macro from the master branch
to the C files in the appropriate places.
2025-05-27 20:40:35 +02:00
Tim Düsterhus 40edd58d36 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  standard: Take `zend.assertions` into account for dynamic calls to `assert()` (#18521)
2025-05-12 08:45:26 +02:00
Tim Düsterhus 8d2682fc50 standard: Take zend.assertions into account for dynamic calls to assert() (#18521)
Fixes php/php-src#18509.
2025-05-12 08:44:46 +02:00
David Carlier 2e2077172d Merge branch 'PHP-8.3' into PHP-8.4 2025-05-04 14:15:05 +01:00
David Carlier 8a585856d1 Fix GH-18480: array_splice overflow on array length with offset.
close GH-18483
2025-05-04 14:14:22 +01:00
Niels Dossche 7a2bef02c0 Fix GH-18400: http_build_query type error is inaccurate
Objects are also accepted still, so the error message is misleading.

Closes GH-18434.
2025-04-26 14:17:24 +02:00
Niels Dossche c6ed104e91 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-17403: Potential deadlock when putenv fails
2025-04-24 20:22:30 +02:00
Niels Dossche 32e091260a Fix GH-17403: Potential deadlock when putenv fails
Closes GH-18368.
2025-04-24 20:22:04 +02:00
haszi 701f3a1af6 Mark ob_start callback parameter nullable 2025-04-14 22:35:06 +02:00
Niels Dossche f4c594bfc6 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix resource leak in iptcembed() on error
2025-04-02 21:06:28 +02:00
Niels Dossche 8a1f6711bf Fix resource leak in iptcembed() on error
Closes GH-18225.
2025-04-02 21:05:48 +02:00
David Carlier dc93f28381 Merge branch 'PHP-8.3' into PHP-8.4 2025-04-02 12:36:08 +01:00
David Carlier 2e47442a6b Fix GH-18212: fseek with SEEK_CUR and negative offset crash on debug
Triggers the assertion as with SEEK_CUR the stream position is set to a
negative value so we force the failure without affecting its position
instead.

close GH-18224
2025-04-02 12:34:50 +01:00
Ilija Tovilo 3ffb310fbd Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Use-after-free in extract() with EXTR_REFS
2025-04-01 16:34:33 +02:00
Ilija Tovilo a21065e6eb Use-after-free in extract() with EXTR_REFS
Fixes GH-18209
Closes GH-18211
2025-04-01 16:33:30 +02:00
Jakub Zelenka 6cf24cd47c Merge branch 'PHP-8.3' into PHP-8.4 2025-03-27 11:37:12 +01:00
Jakub Zelenka 2197a490f7 Fix GH-18145: basic_globals_ctor initialization
This resets all basic globals during ctor and just modifies the ones
with a special value. It also switches to using basic_globals_p which
what should be used in this context.

Closes GH-18156
2025-03-27 11:35:55 +01:00
Jakub Zelenka d4eb6a41b7 Merge branch 'PHP-8.3' into PHP-8.4 2025-03-17 14:52:04 +01:00
Jakub Zelenka bd7d3c38ad Get rid of atime change testing in bug72666_variation3.phpt 2025-03-17 14:49:22 +01:00
Niels Dossche 8156a89eff Fix incorrectly merged bug75535.phpt
Co-authored-by: Jakub Zelenka <bukka@php.net>
2025-03-11 23:06:28 +01:00
Jakub Zelenka 6976fb6ba7 Merge branch 'PHP-8.3' into PHP-8.4 2025-03-11 22:23:09 +01:00
Jakub Zelenka acf2f4988a Merge branch 'PHP-8.2' into PHP-8.3 2025-03-11 22:09:00 +01:00
Jakub Zelenka 4af1830356 Merge branch 'PHP-8.1' into PHP-8.2 2025-03-11 21:57:33 +01:00
Jakub Zelenka 41d49abbd9 Fix GHSA-hgf5-96fm-v528: http user header check of crlf 2025-03-11 21:50:16 +01:00
Jakub Zelenka ac1a054bb3 Fix GHSA-52jp-hrpf-2jff: http redirect location truncation
It converts the allocation of location to be on heap instead of stack
and errors if the location length is greater than 8086 bytes.
2025-03-11 21:50:16 +01:00
Jakub Zelenka 0548c4c175 Fix GHSA-pcmh-g36c-qc44: http headers without colon
The header line must contain colon otherwise it is invalid and it needs
to fail.

Reviewed-by: Tim Düsterhus <tim@tideways-gmbh.com>
2025-03-11 21:50:16 +01:00
Jakub Zelenka d20b4c97a9 Fix GHSA-ghsa-v8xr-gpvj-cx9g: http header folding
This adds HTTP header folding support for HTTP wrapper response
headers.

Reviewed-by: Tim Düsterhus <tim@tideways-gmbh.com>
2025-03-11 21:50:16 +01:00
Niels Dossche 75cca9f19e Fix memory leaks in array_any() / array_all()
The return value is overwritten, but if the key was not an interned
string we should destroy it.

Closes GH-17977.
2025-03-05 19:52:16 +01:00
Jakub Zelenka ed00c1d74b Merge branch 'PHP-8.3' into PHP-8.4 2025-02-24 23:22:47 +01:00
Jakub Zelenka 930624899b Fix bug #72666: stat cache not cleared for plain paths
This adds more aggressive clearing of stat cache. It is added to the
filestat as well as plain wrapper operations which covers stream file
accessing as well as exec functions (using pipes). It should hopefully
fix the most visible issues with the stat cache.

Closes GH-17681
2025-02-24 23:21:45 +01:00
Christoph M. Becker 2c911e400a Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-17879: readfile_variation8-win32.phpt test conflict
2025-02-22 00:10:51 +01:00
Christoph M. Becker 769f292a7a Fix GH-17879: readfile_variation8-win32.phpt test conflict
Apparently a copy and paste issue.

Closes GH-17881.
2025-02-22 00:09:53 +01:00
Christoph M. Becker 8a6370d7a9 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Adapt tests to Windows 11
2025-02-17 00:08:43 +01:00
Christoph M. Becker 765cebf73a Adapt tests to Windows 11
Apparently, one of the more recent patch releases of Windows 10
(confirmed for Windows 10.0.26100, but may affect older versions, too)
changed treatment of filenames with trailing slashes to be recognized
explicitly as directories, and no longer as invalid file or directory.

We adapt the affected test cases.

Closes GH-17804.
2025-02-17 00:07:55 +01:00
Niels Dossche c2e5c58736 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-17650: realloc with size 0 in user_filters.c
2025-02-07 20:24:00 +01:00
Niels Dossche fd5d6ad5bd Fix GH-17650: realloc with size 0 in user_filters.c
If the returned buffer string is of length 0, then a realloc can happen
with length 0. However, the behaviour is implementation-defined.
From 7.20.3.1 of C11 spec:

> If the size of the space requested is zero, the behavior is
> implementation-defined: either a null pointer is returned,
> or the behavior is as if the size were some nonzero value,
> except that the returned pointer shall not be used to access an object

This is problematic for the test case on my system as it returns NULL,
causing a memleak and later using it in memcpy causing UB.
The bucket code is not prepared to handle a NULL pointer.
To solve this, we use MAX to clamp the size to 1 at the least.

Closes GH-17656.
2025-02-07 20:22:52 +01:00
Ilija Tovilo 4ac2c3653b Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Add CONFLICT all to random port test
2025-02-06 15:26:02 +01:00
Ilija Tovilo 68d2bc42fc Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Add CONFLICT all to random port test
2025-02-06 15:25:47 +01:00
Ilija Tovilo c5045a04f2 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Add CONFLICT all to random port test
2025-02-06 15:25:41 +01:00
Ilija Tovilo 726cf51236 Add CONFLICT all to random port test
If we're very unlucky, we can get the same port opened as an ephemeral
port by some other test.

Closes GH-17706
2025-02-06 15:25:16 +01:00
Remi Collet 6945e60f54 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  relax test for zlib-ng
2025-01-29 11:04:20 +01:00
Remi Collet ed1d51fa4f relax test for zlib-ng 2025-01-29 11:03:59 +01:00
Niels Dossche ae3ab37816 Fix GH-17447: Assertion failure when array popping a self addressing variable
This is the same bug as GH-16957, and fixed in the same way.

Closes GH-17448.
2025-01-16 20:28:51 +01:00