1
0
mirror of https://github.com/php/php-src.git synced 2026-04-10 01:23:53 +02:00
Commit Graph

130166 Commits

Author SHA1 Message Date
Pierrick Charron
232bc2d220 Update versions for PHP 8.2.1RC1 php-8.2.1RC1 2022-12-13 19:14:42 -05:00
George Peter Banyard
52a891aeaa Add a new imap_is_open() function to check that a connection object is still valid 2022-12-13 23:48:03 +00:00
Christoph M. Becker
4631e9de2b shmget() with IPC_CREAT must not create 0 size SHM
The recently committed fix for GH-9944 did only indirectly cater to
that, namely because in this case `CreateFileMapping()` with a zero
size couldn't be created.  As of PHP 8.2.0, the mappings of the actual
SHM and the info segment have been merged, so creating a zero size SHM
would be possible unless we explicitly prohibit this.
2022-12-13 19:43:13 +01:00
Christoph M. Becker
9089e15940 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix Windows shmget() wrt. IPC_PRIVATE
2022-12-13 15:49:55 +01:00
Tyson Andre
7a983e281c Fix Windows shmget() wrt. IPC_PRIVATE
Fixes #9944

https://man7.org/linux/man-pages/man2/shmget.2.html notes

   The name choice IPC_PRIVATE was perhaps unfortunate, IPC_NEW
   would more clearly show its function.

Closes GH-9946.
2022-12-13 15:46:40 +01:00
Christoph M. Becker
87c2f5b5a2 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-9949: Partial content on incomplete POST request
2022-12-13 15:24:07 +01:00
Christoph M. Becker
aef7d810d3 Fix GH-9949: Partial content on incomplete POST request
`ap_get_brigade()` may fail for different reasons, and we must not
pretend that a partially read POST payload is fine; instead we report
a content length of zero what matches all other `read_post()` callbacks
of bundled SAPIs.

Closes GH-10059.
2022-12-13 15:21:42 +01:00
Mattias Ellert
a83923044c Fix compilation on RHEL 7 ppc64le (gcc 4.8)
Fixes GH-10077
Closes GH-10078
2022-12-11 17:30:31 +01:00
David Carlier
8a221e2763 fix litespeed SAPI build warnings.
- helpers only called on linux anyway.
- proper C calls prototypes.

Closes GH-10068.
2022-12-10 14:13:30 +00:00
Daniel Black
b77edf82ac Fix mysqli test wrt. MariaDB
The test results under MariaDB, except they report "MariaDB" instead
of MySQL.

Closes GH-10029.
2022-12-09 16:09:23 +01:00
Alex Dowad
b79a86f53a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Support Microsoft's "Best Fit" mappings for Windows-1252 text encoding
2022-12-09 15:37:56 +02:00
Alex Dowad
a1a69c3734 Support Microsoft's "Best Fit" mappings for Windows-1252 text encoding
In b5ff87ca71, I made a number of adjustments to our conversion code
for CP1252. One of the adjustments was to make the mappings match those
published by the Unicode Consortium in the file CP1252.TXT. These do
not include mappings for the CP1252 bytes 0x81, 0x8D, 0x8F, 0x90, and
0x9D.

Rostyslav Gulka reported that this caused a problem. His application
stores binary JPEG data in an MS-SQL database. When they SELECT the
binary data out of the database, it is treated as CP1252 text and
automatically converted to UTF-8. To recover the original binary
data, they then do a conversion from UTF-8 to CP1252.

Obviously, that does not work if certain CP1252 bytes do not map to
any Unicode codepoint at all.

While this is a very unusual application of text encoding conversion,
and we might choose not to support it if there was no other basis for
including those mappings, it seems that Microsoft does actually include
them in the Win32 API as "best fit" mappings. These are extra mappings
from Unicode to other text encodings, which the Win32 API function
WideCharToMultiByte uses by default unless the WC_NO_BEST_FIT_CHARS
flag was passed.

A list of these "best fit" mappings for CP1252 can be found here:

https://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WindowsBestFit/bestfit1252.txt
2022-12-09 15:18:37 +02:00
Christoph M. Becker
a76bbd39b6 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  ext/mysqli tests "using password" optional in error messages (part 2)
2022-12-08 14:24:01 +01:00
Daniel Black
c21a5920ac ext/mysqli tests "using password" optional in error messages (part 2)
Like GH-10035 for ext/mysqli/tests/mysqli_connect.phpt test.

Closes GH-10064.
2022-12-08 14:23:33 +01:00
Christoph M. Becker
01eabdc4ec [ci skip] Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  PHP-8.1 is now for PHP 8.1.15-dev
2022-12-08 14:19:02 +01:00
Ben Ramsey
696bb385df PHP-8.1 is now for PHP 8.1.15-dev 2022-12-07 11:29:37 -06:00
Christoph M. Becker
830180341b Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix #81742: open_basedir bypass in SQLite3 by using file URI
2022-12-06 16:00:49 +01:00
Christoph M. Becker
2f6b9e6c63 Fix #81742: open_basedir bypass in SQLite3 by using file URI
A previous fix[1] was not sufficient to catch all potential file URIs,
because the patch did not cater to URL encoding.  Properly parsing and
decoding the URI may yield a different result than the handling of
SQLite3, so we play it safe, and reject any file URIs if open_basedir
is configured.

[1] <https://bugs.php.net/bug.php?id=77967>

Closes GH-10018.
2022-12-06 15:59:52 +01:00
Christoph M. Becker
0ac9e8e4e2 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  ext/mysqli tests "using password" optional in error messages
2022-12-05 13:12:54 +01:00
Daniel Black
b6b4a628a5 ext/mysqli tests "using password" optional in error messages
Closes GH-10035.
2022-12-05 13:12:23 +01:00
Christoph M. Becker
b683a7e470 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fallback to first line of function when ex->opline is NULL (#10003)
2022-12-05 12:45:22 +01:00
Arnaud Le Blanc
adc23828b4 Fallback to first line of function when ex->opline is NULL (#10003)
ex->opline can be null due to missing SAVE_OPLINE() in the VM

Fixes GH-9933
2022-12-02 17:21:30 +01:00
George Peter Banyard
334d108a2e Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10011 (Trampoline autoloader will get reregistered and cannot be unregistered)
2022-12-02 12:48:41 +00:00
George Peter Banyard
608ddb0321 Fix GH-10011 (Trampoline autoloader will get reregistered and cannot be unregistered)
There are two issues to resolve:
 1. The FCC is not refetch when trying to unregister a trampoline
 2. Comparing the function pointer of trampolines is meaningless as they are reallocated, thus we need to compare the name of the function

Found while working on GH-8294

Closes GH-10033
2022-12-02 12:47:25 +00:00
Christoph M. Becker
6b1f4c5a44 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-9769: Misleading error message for unpacking of objects
2022-12-02 13:11:51 +01:00
蝦米
93592ea743 Fix GH-9769: Misleading error message for unpacking of objects
Only arrays can be unpacked in constant expressions.

Closes GH-9776.
2022-12-02 13:10:59 +01:00
Derick Rethans
1316a5b8fb Merge branch 'PHP-8.1' into PHP-8.2 2022-12-01 11:08:38 +00:00
Derick Rethans
29f0f4edd2 Merge branch 'regression-tzid-with-numbers' into PHP-8.1 2022-12-01 10:59:01 +00:00
Derick Rethans
c87c803b96 Some (old, backwards compatible) TZIDs can have numbers in them 2022-12-01 10:58:37 +00:00
Derick Rethans
41fef8b849 Import timelib 2022.03 2022-11-30 15:58:02 +00:00
Derick Rethans
83b714d788 Merge branch 'PHP-8.1' into PHP-8.2 2022-11-30 15:55:46 +00:00
Derick Rethans
64f5f5333e Merge remote-tracking branch 'derickr/timelib-2021.18' into PHP-8.1 2022-11-30 15:53:52 +00:00
Derick Rethans
d021851171 Fixed GH-9699, GH-9866, and GH-9880 (problems with diff); and GH-9700 (greedy tzid parsing) 2022-11-30 15:47:43 +00:00
Derick Rethans
818b46acb0 Import timelib 2021.18 2022-11-30 15:42:11 +00:00
Christoph M. Becker
e29ca3688b Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-9971: Incorrect NUMERIC value returned from PDO_Firebird
2022-11-30 12:13:11 +01:00
Christoph M. Becker
44377c3c70 Fix GH-9971: Incorrect NUMERIC value returned from PDO_Firebird
Dialect 1 databases store and transfer `NUMERIC(15,2)` values as
doubles, which we need to cater to in `firebird_stmt_get_col()` to
avoid `ZEND_ASSUME(0)` to ever be triggered, since that may result
in undefined behavior.

Since adding a regression test would require to create a dialect 1
database, we go without it.

Closes GH-10021.
2022-11-30 12:11:42 +01:00
Derick Rethans
e568f93422 Updated to version 2022.7 (2022g) 2022-11-29 18:25:16 +00:00
Derick Rethans
6f71697e65 Empty merge 2022-11-29 18:25:16 +00:00
Derick Rethans
bcc00304c7 Updated to version 2022.7 (2022g) 2022-11-29 18:25:15 +00:00
Tim Düsterhus
350883db06 [ci skip] random: Trim trailing whitespace in randomizer.c
To keep the diff cleaner for future changes, such as #9664.
2022-11-27 19:10:45 +01:00
Jakub Zelenka
c8d8bf7c59 Merge branch 'PHP-8.1' into PHP-8.2 2022-11-25 14:07:41 +00:00
Jakub Zelenka
500b28ad04 Fix GH-10000: Test failures when OpenSSL compiled with no-dsa 2022-11-25 14:02:03 +00:00
Arnaud Le Blanc
772bb62526 [ci skip] NEWS 2022-11-25 14:37:43 +01:00
Arnaud Le Blanc
5563535e97 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
  Do not resolve constants on non-linked class during preloading (#9975)
2022-11-25 14:11:52 +01:00
Arnaud Le Blanc
4987e65a70 [ci skip] NEWS 2022-11-25 14:07:30 +01:00
Arnaud Le Blanc
91b3b58f71 Do not resolve constants on non-linked class during preloading (#9975)
Fixes GH-9968
2022-11-25 14:02:45 +01:00
Jakub Zelenka
c022ce92fb Merge branch 'PHP-8.1' into PHP-8.2 2022-11-25 12:50:38 +00:00
Jakub Zelenka
ce57221376 Fix GH-9064: PHP fails to build if openssl was built with no-ec 2022-11-25 12:49:12 +00:00
Jakub Zelenka
3d90a24e93 Fix GH-9997: OpenSSL engine clean up segfault 2022-11-24 18:29:44 +00:00
Jakub Zelenka
3871ab2be6 Merge branch 'PHP-8.1' into PHP-8.2 2022-11-24 11:55:17 +00:00