Commit Graph

15746 Commits

Author SHA1 Message Date
Christoph M. Becker
58ac56f4bb
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-15087 IntlChar::foldCase()'s $option is not optional
2024-07-24 16:48:44 +02:00
Christoph M. Becker
ce25be5223
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15087 IntlChar::foldCase()'s $option is not optional
2024-07-24 16:47:03 +02:00
Christoph M. Becker
5fbda73099
Fix GH-15087 IntlChar::foldCase()'s $option is not optional
Since that parameter is supposed to be optional (and has been prior to
PHP 8.0.0), we fix the implementation instead of the stub.

Closes GH-15091.
2024-07-24 16:45:20 +02:00
Simonov Denis
00e45887fa
PDO_Firebird: Supported Firebird 4.0 datatypes (#14897)
Five new data types are now available: INT128, DEC16, DEC34, TIMESTAMP_TZ, TIME_TZ.
These are available starting with Firebird 4.0.

closes #14897
2024-07-23 22:34:21 +09:00
David Carlier
5bac3c27c9
Merge branch 'PHP-8.2' into PHP-8.3 2024-07-22 22:58:18 +01:00
David Carlier
ba909d7c43
Fix GH-14780: p(f)sockopen overflow on timeout argument.
close GH-14785
2024-07-22 22:57:59 +01:00
Niels Dossche
40e0e92212
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix uninitialized memory in network.c
2024-07-22 22:25:53 +02:00
Niels Dossche
40551dd74b
Fix uninitialized memory in network.c
See https://github.com/php/php-src/issues/14806#issuecomment-2208150509
and https://github.com/php/php-src/issues/14806#issuecomment-2208690481

Closes GH-15068.
2024-07-22 22:25:28 +02:00
David Carlier
21418b5bb5
ext/intl: SpoofChecker::setAllowedChars support.
To limit the acceptable range of acceptable unicode chars via individual
ones or via a pattern.
2024-07-22 19:52:56 +01:00
Arnaud Le Blanc
b537f01353
[ci skip] NEWS 2024-07-22 19:30:32 +02:00
Arnaud Le Blanc
4377dff59c
[ci skip] NEWS 2024-07-22 19:28:28 +02:00
Arnaud Le Blanc
929536b697
Hint the opcache shm mapping location only when JIT is enabled
Closes GH-14793
Fixes GH-13775
2024-07-22 19:26:54 +02:00
Niels Dossche
46924ac9fa
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix bogus fallthrough path in firebird_handle_get_attribute()
2024-07-22 18:33:32 +02:00
Niels Dossche
b8e9c5ba6a
Fix bogus fallthrough path in firebird_handle_get_attribute()
If getting the version fails, we should return -1 according to
php_pdo_driver.h:259, not fall through to another attribute.

Closes GH-15066.
2024-07-22 18:33:03 +02:00
Bob Weinand
61b455b59c Merge branch 'PHP-8.2' into PHP-8.3 2024-07-22 18:30:10 +02:00
Bob Weinand
a18df90a8b Fix GH-13817: Segmentation fault for enabled observers after pass 4
Instead of fixing up temporaries count in between observer steps, just apply the additional temporary in the two affected observer steps.

Closes GH-14018.
2024-07-22 18:28:03 +02:00
Niels Dossche
a0e1e085d8
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix passing non-finite timeout values in stream functions
2024-07-22 17:52:53 +02:00
Niels Dossche
fdcfd62b9b
Fix passing non-finite timeout values in stream functions
Closes GH-15061.
2024-07-22 17:52:21 +02:00
Niels Dossche
b2963e96ee
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14286 (ffi enum type (when enum has no name) make memory leak)
2024-07-22 17:45:20 +02:00
Niels Dossche
c0de7214aa
Fix GH-14286 (ffi enum type (when enum has no name) make memory leak)
For top-level anonymous type definition we never store the declaration anywhere
else nor the type anywhere else.
The declaration keeps owning the type and it goes out of scope.
For anonymous fields this gets handled by the add_anonymous_field code that
removes the type from the declaration.
This patch does something similar in the parsing code when it is
detected we're dealing with an anonymous enum in a top-level declaration.

Closes GH-14839.
2024-07-22 17:44:47 +02:00
Ilija Tovilo
82479e89d0
Throw error for recursive comparison, instead of fatal (#14989)
I don't understand the rationale of fatal erroring here. It seems this should
properly unprotect the compared elements when returning up the stack.

Related to GH-14980
2024-07-22 15:53:41 +02:00
Peter Kokot
f702437cad
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Append -Wno-implicit-fallthrough flag conditionally (#13331)
2024-07-22 06:58:01 +02:00
Peter Kokot
d20d11375f
Append -Wno-implicit-fallthrough flag conditionally (#13331)
Older GCC versions (< 7.0) don't support the -Wno-implicit-fallthrough
compiler flag. This adds the flag conditionally in case some other
compiler will run into same issue.

Fixes GH-13330
2024-07-22 06:57:04 +02:00
Niels Dossche
c26d1a36e2
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15034: Integer overflow on stream_notification_callback byte_max parameter with files bigger than 2GB
2024-07-21 22:02:47 +02:00
Niels Dossche
cfcc2a3fda
Fix GH-15034: Integer overflow on stream_notification_callback byte_max parameter with files bigger than 2GB
We were using atoi, which is only for integers. When the size does not
fit in an integer this breaks. Use ZEND_STRTOUL instead. Also make sure
invalid data isn't accidentally parsed into a file size.

Closes GH-15035.
2024-07-21 22:02:11 +02:00
Niels Dossche
186788f149 Fix error handling in tidy constructor 2024-07-21 18:36:19 +02:00
David Carlier
f6940b9239
[ci skip] NEWS update 2024-07-21 17:16:43 +01:00
Niels Dossche
9435f4d55b
Throw instead of silently failing when creating a too long text node
Lower branches suffer from this as well but we cannot change the
behaviour there.
We also add NULL checks to check for allocation failure.

Closes GH-15014.
2024-07-21 17:08:06 +02:00
Niels Dossche
74de766d41
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix memory leaks in ext/tidy basedir restriction code
2024-07-21 16:28:45 +02:00
Niels Dossche
8de7ccb29b
Fix memory leaks in ext/tidy basedir restriction code
TIDY_APPLY_CONFIG can early return because it's a macro, but then the
cleanup paths are not executed. Transform this to a real function and
handle the cleanups correctly at the callsites.

Closes GH-15046.
2024-07-21 16:28:15 +02:00
David Carlier
ba54cebb44
ext/pgsql: pg_convert/pg_insert/pg_update/pg_delete caching regexes.
Close GH-15039
2024-07-20 23:04:48 +01:00
Niels Dossche
f21947a7ae
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-15028: Memory leak in ext/phar/stream.c
  Fix GH-15023: Memory leak in Zend/zend_ini.c
  Fix GH-15020: Memory leak in Zend/Optimizer/escape_analysis.c
2024-07-19 14:59:44 +02:00
Niels Dossche
5996227f88
Fix GH-15028: Memory leak in ext/phar/stream.c
Closes GH-15029.
2024-07-19 14:58:28 +02:00
Niels Dossche
8c19efdc97
Fix GH-15023: Memory leak in Zend/zend_ini.c
Closes GH-15024.
2024-07-19 14:57:19 +02:00
Niels Dossche
03d73182d9
Fix GH-15020: Memory leak in Zend/Optimizer/escape_analysis.c
Closes GH-15022.
2024-07-19 14:56:28 +02:00
Tim Düsterhus
5905857fd2
RFC: Add the RoundingMode enum (#14833)
see https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum

Co-authored-by: Saki Takamachi <saki@php.net>
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2024-07-18 20:44:30 +02:00
Niels Dossche
a59103feed
Fix trampoline leak in xpath callables
Closes GH-15009.
2024-07-18 16:54:46 +02:00
David Carlier
383d1b0330
Merge branch 'PHP-8.2' into PHP-8.3 2024-07-18 06:26:22 +01:00
David Carlier
efd00b8ff0
ext/curl: curl_error using curl_easy_strerror if CURLOPT_ERRORBUFFER
did not fill the error buffer.

close GH-14984
2024-07-18 06:25:37 +01:00
Saki Takamachi
c550d341ff
ext/pdo_firebird: Added getApiVersion() and removed from getAttribute (#15004) 2024-07-18 11:17:52 +09:00
Niels Dossche
d3caedd6d2
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix bug #55639: Digest autentication dont work
2024-07-17 19:31:54 +02:00
Niels Dossche
911dc5b46c
Fix bug #55639: Digest autentication dont work
RFC 2617 and 7616 describe that for the "Authorization" header we should
not put the qop nor nc value inside quotes. This differs from the
WWW-Authenticate header, which may have been the source of the confusion
in the implementation. While the version with quotes seems to work fine
in some cases, clearly not all servers accept the non-standard form.
To fix the issue, simply removing the quotes of those two header fields
of the client request to be in line with the RFC suffices.

I refer further to example 3.5 in RFC 2617 and example 3.9.1 in
RFC 7616.

RFC 2617: https://datatracker.ietf.org/doc/html/rfc2617
RFC 7616: https://datatracker.ietf.org/doc/html/rfc7616

Closes GH-14328.
2024-07-17 19:23:10 +02:00
Saki Takamachi
d55ef3f339
ext/pdo_firebird: Added Pdo\Firebird::ATTR_API_VERSION (#14916)
closes #14916
2024-07-17 20:32:37 +09:00
Christoph M. Becker
f590b34530
Drop support for OpenSSL < 1.1.0 on Windows
PR #13498 bumped the required OpenSSL version to 1.1.1, but apparently
only for non Windows system.  We catch up somewhat by dropping support
for OpenSSL < 1.1.0 on Windows; besides completely removing detection
of old OpenSSL versions in `SETUP_OPENSSL`, we also ensure that all
bundled extension using this function do no longer accept OpenSSL <
1.1.0, to avoid to still be able to build these extensions with older
`phpize` scripts.

We do not cater to `--phar-native-ssl` yet; that might better be
addressed by #14578.

Closes GH-14973.
2024-07-17 12:22:59 +02:00
Ilija Tovilo
e01e2bb5fd
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix comments between -> and keyword
2024-07-16 23:40:59 +02:00
Ilija Tovilo
b368db204f
Fix comments between -> and keyword
Comments should not fall out of ST_LOOKING_FOR_PROPERTY.

Fixes GH-14961
Closes GH-14976
2024-07-16 23:40:18 +02:00
Peter Kokot
71c520c74f
Fix xmlreader extension phpize build
When building ext/xmlreader with phpize, also ext/dom/dom_ce.h needs to
be installed by dom extension as it is used in
the ext/xmlreader/php_xmlreader.c.

    cd ext/xmlreader
    phpize
    ./configure
    make

Closes GH-14978
2024-07-16 22:35:59 +02:00
Niels Dossche
eb181926be
[ci skip] Fix NEWS 2024-07-16 22:25:41 +02:00
Niels Dossche
f58a3c392f
Fix references in request_parse_body() options array
Otherwise we get funny messages like
"Invalid string value in $options argument".

Closes GH-14977.
2024-07-16 20:07:59 +02:00
Pierrick Charron
c21cfa1135
[skip ci] Fix PHP 8.3.10 release date and version in NEWS 2024-07-16 12:23:31 -04:00