1
0
mirror of https://github.com/php/php-src.git synced 2026-04-12 18:43:37 +02:00
Commit Graph

129048 Commits

Author SHA1 Message Date
Pierrick Charron
c2f5bd12cb Making PHP 8.2.0 beta1 php-8.2.0beta1 2022-07-19 12:12:32 -04:00
Tim Düsterhus
3292e54d8c Run scripts/dev/credits
see 4d8dd8d258
2022-07-19 17:45:15 +02:00
Tim Düsterhus
065e284f8e [ci skip] Link the random extension RFCs in UPGRADING
see 4d8dd8d258
2022-07-19 17:44:22 +02:00
Ben Ramsey
ba4e379971 [ci skip] update branch creation time frame in release process doc 2022-07-19 10:41:48 -05:00
Christoph M. Becker
33dae4bc02 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-9017: php_stream_sock_open_from_socket could return NULL
2022-07-19 17:08:05 +02:00
Christoph M. Becker
32d55f7422 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-9017: php_stream_sock_open_from_socket could return NULL
2022-07-19 17:07:27 +02:00
Heiko Weber
3b7babf9b3 Fix GH-9017: php_stream_sock_open_from_socket could return NULL
Closes GH-9020.
2022-07-19 17:06:02 +02:00
Christoph M. Becker
40924130fe Merge branch 'PHP-8.1'
* PHP-8.1:
  Prepare for PHP 8.0.23
  Revert "FPM: Downgrade occasional "failed to acquire scoreboard" warning"
2022-07-19 17:01:41 +02:00
Christoph M. Becker
aa1fa8cabf Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Prepare for PHP 8.0.23
  Revert "FPM: Downgrade occasional "failed to acquire scoreboard" warning"
2022-07-19 17:00:05 +02:00
Tim Düsterhus
7ae7df5b46 RFC: Make the iterator_*() family accept all iterables (#8819)
https://wiki.php.net/rfc/iterator_xyz_accept_array
2022-07-19 16:46:32 +02:00
Javier Eguiluz
37cf7f6d3c [ci skip] Fix minor typos
Closes GH-9047.
2022-07-19 16:43:44 +02:00
Máté Kocsis
e328c68305 Rename @cname to @cvalue in stubs (#9043)
@cname currently refers to the constant name in C. However, it is not always a (constant) name, but sometimes a function invocation, so naming it as @cvalue would be more appropriate.
2022-07-19 15:11:42 +02:00
David CARLIER
1416961505 opcache JIT support improvements attempts on macOs.
for cases when shared segments switch b/w R/W/X and R/X bits.

Closes #8382.
2022-07-19 13:41:33 +01:00
dixyes
180557dd9c Do not assert SSE/AVX resolvers at windows arm64
NEWS/UPGRADING are already handled by 745cf34ffc.

Closes GH-7704.
2022-07-19 14:04:51 +02:00
dixyes
745cf34ffc Port standard/crc32 for windows arm64
We also add arm64 support for php_get_windows_cpu().

Closes GH-7703.
2022-07-19 13:23:44 +02:00
Kamil Tekiela
079773c291 Merge branch 'IS_MARIADB'
* IS_MARIADB:
  Deprecate MYSQLI_IS_MARIADB
2022-07-19 11:21:26 +01:00
Kamil Tekiela
5a69cb6fa1 Deprecate MYSQLI_IS_MARIADB
Closes GH-8919
2022-07-19 11:19:41 +01:00
Go Kudo
4d8dd8d258 Implement Random Extension
https://wiki.php.net/rfc/rng_extension
https://wiki.php.net/rfc/random_extension_improvement
2022-07-19 10:27:38 +01:00
Christoph M. Becker
8fec415557 Drop support for SQLITE_COPY in authorizer callback
According to the sources, `SQLITE_COPY` is unused as of SQLite
3.6.10[1] (at least), so there is no need to support it any longer; we
require at least SQLite 3.7.7 at minimum.

[1] <https://github.com/sqlite/sqlite/blob/version-3.6.10/src/sqlite.h.in#L2411>

Closes GH-9041.
2022-07-19 10:55:50 +02:00
Gabriel Caruso
a670d2be74 Prepare for PHP 8.0.23 2022-07-19 10:31:08 +02:00
Máté Kocsis
e13d60c039 DatePeriod properties cannot be made readonly (#9013) 2022-07-19 10:20:45 +02:00
Derick Rethans
0dbedb3dbd Fixed memory leaks with DatePeriod::__unserialise 2022-07-18 23:58:19 +01:00
Eric Norris
09237f6126 Update request startup error messages 2022-07-18 23:19:59 +01:00
Ilija Tovilo
7aadbcb8f4 GH-8344 Fetch properties of enums in const expressions 2022-07-18 23:52:28 +02:00
Jakub Zelenka
922371f3b1 Do not send X-Powered-By if headers sent (#9039)
Co-authored-by: Eric Norris <erictnorris@gmail.com>
2022-07-18 18:01:05 +01:00
root
d8fc05c05e Add FILTER_FLAG_GLOBAL_RANGE to filter Global IPs as per RFC 6890 2022-07-18 17:56:05 +01:00
Mikhail Galanin
ffdf25a270 Add "error_log_mode" setting 2022-07-18 15:41:28 +01:00
Derick Rethans
7db9c2a2c3 Fixed typo in configure message 2022-07-18 15:18:08 +01:00
Felix Wiedemann
db5f6713ee FPM Downgrade occasional "failed to acquire scoreboard" warning
With request timeouts configured, php-fpm occasionally prints the
following warning:

   WARNING: failed to acquire scoreboard

This is happens when php-fpm checks the child scoreboards for timeouts,
but fails to acquire a lock immediately.  As this can (and does) occur
during normal operation, this commit downgrades this to a notice.
2022-07-18 14:40:39 +01:00
David Carlier
079221b30e Merge branch 'PHP-8.1' 2022-07-18 14:40:07 +01:00
David CARLIER
9a8ae45c4b Revert "FPM: Downgrade occasional "failed to acquire scoreboard" warning"
This reverts commit 3040f75f43.
2022-07-18 14:21:54 +01:00
David CARLIER
2a5b2cca85 Revert "FPM: Downgrade occasional "failed to acquire scoreboard" warning"
This reverts commit 3040f75f43.
2022-07-18 14:21:07 +01:00
Alex Dowad
76a92c26e3 mb_decode_numericentity decodes valid entities which are truncated at end of string
Since mb_decode_numericentity does not require all HTML entities
to end with ';', but allows them to be terminated by ANY non-digit
character, it doesn't make sense that valid entities which butt
up against the end of the input string are not converted.

As it turned out, supporting this case also made it possible
to simplify the code nicely.
2022-07-18 15:11:47 +02:00
Alex Dowad
5d6bd557b3 mb_decode_numericentity converts entities which immediately follow a valid/invalid entity
Thanks to Kamil Tieleka for suggesting that some of the behaviors of
the legacy implementation which the new mb_decode_numericentity
implementation took care to maintain were actually bugs and should
be fixed. Thanks also to Trevor Rowbotham for providing a link to
the HTML specification, showing how HTML numeric entities should
be interpreted.

mb_decode_numericentity now processes numeric entities in the
following situations where the old implementation would not:

- &<ENTITY> (for example, &&#65;)
- &#<ENTITY>
- &#x<ENTITY>
- <VALID BUT UNTERMINATED DECIMAL ENTITY><ENTITY> (for example, &#65&#65;)
- <VALID BUT UNTERMINATED HEX ENTITY><ENTITY>
- <INVALID AND UNTERMINATED DECIMAL ENTITY><ENTITY> (it does not matter why
  the first entity is invalid; the value could be too big, it could have
  too many digits, or it could not match the 'convmap' parameter)
- <INVALID AND UNTERMINATED HEX ENTITY><ENTITY>

This is consistent with the way that web browsers process
HTML entities.
2022-07-18 15:11:32 +02:00
Alex Dowad
30bfeef48d mbfl_strwidth does not need to use legacy conversion filters now
...Because we have the new (faster) conversion filters now for
ALL text encodings supported by mbstring.
2022-07-18 15:11:32 +02:00
Alex Dowad
40f5048aa7 Fix new conversion filter for UUEncode
This code (written by yours truly) was very broken on input
strings long enough to require processing in multiple chunks.
Fuzzing revealed this very quickly; after initial rework,
further fuzzing also found a couple of very obscure bugs in
corner cases.
2022-07-18 15:11:32 +02:00
Alex Dowad
5fee30b630 Fix new conversion filter for QPrint (same order of check as legacy code)
Because of checking for maximum line length *before* certain other checks,
the new conversion filter for QPrint could produce different results from
the old one in some cases. This was discovered while fuzzing the new
implementation of mb_decode_numericentity.
2022-07-18 15:11:32 +02:00
Alex Dowad
3cf432798e Fix new conversion filter for CP50220 (multi-codepoint kana at end of buffer)
If two codepoints which needed to be collapsed into a single kuten code
were separated, with one at the end of one buffer and the other at the
beginning of the next buffer, they were not converted correctly.
This was discovered while fuzzing the new implementation of
mb_decode_numericentity.
2022-07-18 15:11:31 +02:00
Alex Dowad
7559bf77d2 Fix new conversion filters for mobile SJIS variants ('0' at end of buffer)
Previously, I had adjusted this code so that if a character which could
be part of a special Docomo/Softbank/KDDI 'keypad' emoji appeared at
the end of one buffer, and the 'keypad' character appeared at the
beginning of the next, they would still be combined. However, this
broke the handling of such a character appearing at the end of one
buffer, and a character which is NOT 'keypad' appearing at the
beginning of the next.

This was found while fuzzing the new implementation of
mb_decode_numericentity.
2022-07-18 15:11:31 +02:00
Alex Dowad
fa83a8e15e Fix new conversion filter for HTML entities
While fuzzing the new mb_decode_numericentity implementation, I discovered
that the fast conversion filter for 'HTML-ENTITIES' did not correctly
handle an empty named entity ('&;'), nor did it correctly handle
invalid named entities whose names were a prefix of a valid entity.
Also, it did not correctly handle the case where a named entity is
truncated and another named entity starts abruptly.
2022-07-18 15:11:31 +02:00
Alex Dowad
9c3972fb3d Fix legacy conversion filter for HZ 2022-07-18 15:11:31 +02:00
Alex Dowad
1526bab6d0 Fix legacy conversion filter for GB18030 2022-07-18 15:11:31 +02:00
Alex Dowad
6938e35122 Fix legacy conversion filter for CP50220 2022-07-18 15:11:31 +02:00
Alex Dowad
1662f7f79f Fix legacy conversion filter for UTF-7 2022-07-18 15:11:31 +02:00
Alex Dowad
c8e4f313fa Fix legacy conversion filter for ISO-2022-KR
When I was working on this code before, it really, really
looked like the index into `uhc3_ucs_table` could never
overrun the size of the table. Why did I get this wrong?
Don't know. Anyways, libfuzzer tore away my illusions
and unequivocally demonstrated that the index CAN be
larger than the size of the table.
2022-07-18 15:11:31 +02:00
Alex Dowad
cebb8009c6 Fix legacy conversion filters for... almost all 8-bit text encodings 2022-07-18 15:11:31 +02:00
Alex Dowad
2eff19e38f Fix legacy conversion filter for HTML entities 2022-07-18 15:11:31 +02:00
Alex Dowad
87b71595ba Fix legacy conversion filter for Base64 2022-07-18 15:11:31 +02:00
Alex Dowad
7ece8f18b0 Fix legacy conversion filter for MacJapanese 2022-07-18 15:11:31 +02:00
Alex Dowad
d7bab66135 Fix legacy conversion filter for SJIS-2004 2022-07-18 15:11:31 +02:00