History log of /php-src/NEWS (Results 1151 – 1175 of 15454)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 175ff603 09-May-2023 Amedeo Baragiola

Fix compilation error on old GCC versions

In older versions of GCC (<=4.5) designated initializers would not accept member
names nested inside anonymous structures. Instead, we need to u

Fix compilation error on old GCC versions

In older versions of GCC (<=4.5) designated initializers would not accept member
names nested inside anonymous structures. Instead, we need to use a positional
member wrapped in {}.

Fixes GH-11063
Closes GH-11212

show more ...


# 6ba0b068 08-May-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Fix GH-8426: make test fail while soap extension build

If you build soap as a shared object, then these tests fail on
non-Windows, or when the PHP install hasn't been make install-ed yet

Fix GH-8426: make test fail while soap extension build

If you build soap as a shared object, then these tests fail on
non-Windows, or when the PHP install hasn't been make install-ed yet,
but is executed from the development directory.

Closes GH-11211.

show more ...


# baa07f3d 06-May-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-11180: hash_file() appears to be restricted to 3 arguments

Closes GH-11198.


# 7c0dfc5c 29-Apr-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-11160: Few tests failed building with new libxml 2.11.0

It's possible to categorise the failures into 2 categories:
- Changed error message. In this case we either duplicate the

Fix GH-11160: Few tests failed building with new libxml 2.11.0

It's possible to categorise the failures into 2 categories:
- Changed error message. In this case we either duplicate the test and
modify the error message. Or if the change in error message is
small, we use the EXPECTF matchers to make the test compatible with both
old and new versions of libxml2.
- Missing warnings. This is caused by a change in libxml2 where the
parser started using SAX APIs internally [1]. In this case the
error_type passed to php_libxml_internal_error_handler() changed from
PHP_LIBXML_ERROR to PHP_LIBXML_CTX_WARNING because it internally
started to use the SAX handlers instead of the generic handlers.
However, for the SAX handlers the current input stack is empty, so
nothing is actually printed. I fixed this by falling back to a
regular warning without a filename & line number reference, which
mimicks the old behaviour. Furthermore, this change now also shows
an additional warning in a test which was previously hidden.

[1] https://gitlab.gnome.org/GNOME/libxml2/-/commit/9a82b94a94bd310db426edd453b0f38c6c8f69f5

Closes GH-11162.

show more ...


# a0e71cb8 06-May-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix maximum argument count of pcntl_forkx()

Closes GH-11199.


# 4d4b9604 10-Apr-2023 Florian Moser

Fix GH-11054: Reset OpenSSL errors when using a PEM public key

The error happens when the PEM contains a public key, as it will be
first tried to be parsed as a certificate. The parsing

Fix GH-11054: Reset OpenSSL errors when using a PEM public key

The error happens when the PEM contains a public key, as it will be
first tried to be parsed as a certificate. The parsing as a certificate
fails, which then leads to a corresponding error tracked by PHP with
the next call to php_openssl_store_errors().

This change introduces an error marking to be able to reset the stored
errors to the state before trying the certificate.

Closes GH-11055

show more ...


# fa10dfcc 25-Feb-2023 Daniel Kesselberg

Add PKCS7_NOOLDMIMETYPE and OPENSSL_CMS_OLDMIMETYPE

PKCS7_NOOLDMIMETYPE to use Content-Type application/pkcs7-mime
OPENSSL_CMS_OLDMIMETYPE to use Content-Type application/x-pkcs7-mime

Add PKCS7_NOOLDMIMETYPE and OPENSSL_CMS_OLDMIMETYPE

PKCS7_NOOLDMIMETYPE to use Content-Type application/pkcs7-mime
OPENSSL_CMS_OLDMIMETYPE to use Content-Type application/x-pkcs7-mime

SMIME_write_PKCS7 and SMIME_write_CMS are using SMIME_write_ASN1_ex.
The Content-Type application/x-pkcs7-mime is generated with the flag SMIME_OLDMIME (0x400).[^1]

SMIME_write_PKCS7 set SMIME_OLDMIME by default.[^2]
SMIME_write_CMS does not.[^3]

I picked OPENSSL_CMS_OLDMIMETYPE over OPENSSL_CMS_NOOLDMIMETYPE because that's what the flag actually does.

[^1]: https://github.com/openssl/openssl/blob/9a2f78e14a67eeaadefc77d05f0778fc9684d26c/crypto/asn1/asn_mime.c#L248-L251
[^2]: https://github.com/openssl/openssl/blob/9a2f78e14a67eeaadefc77d05f0778fc9684d26c/crypto/pkcs7/pk7_mime.c#L41-L43
[^3]: https://github.com/openssl/openssl/blob/9a2f78e14a67eeaadefc77d05f0778fc9684d26c/crypto/cms/cms_io.c#L93

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>

show more ...


# ac5920f9 29-Apr-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-11141: Could not open input file: should be sent to stderr

I grepped for php_printf cases in main/ and sapi/ and converted the
cases which clearly indicate errors to fprintf(stder

Fix GH-11141: Could not open input file: should be sent to stderr

I grepped for php_printf cases in main/ and sapi/ and converted the
cases which clearly indicate errors to fprintf(stderr, ...), like
suggested in the linked issue.

Closes GH-11163.

show more ...


# b33fbbfe 02-Feb-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-10031: [Stream] STREAM_NOTIFY_PROGRESS over HTTP emitted irregularly for last chunk of data

It's possible that the server already sent in more data than just the headers.
Since th

Fix GH-10031: [Stream] STREAM_NOTIFY_PROGRESS over HTTP emitted irregularly for last chunk of data

It's possible that the server already sent in more data than just the headers.
Since the stream only accepts progress increments after the headers are
processed, the already read data is never added to the process.
We account for this by adjusting the progress counter by the difference of
already read header data and the body.

For the test:
Co-authored-by: aetonsi <18366087+aetonsi@users.noreply.github.com>

Closes GH-10492.

show more ...


# f31d2538 02-May-2023 David CARLIER

ext/pgsql adding PGSQL_ERRORS_SQLSTATE constant support.

Close GH-11181


# 3af5f47c 01-Mar-2023 Calvin Buckley

`http_response_code` should warn if headers were already sent

This would previously fail silently. We also return false to indicate the error.

Fixes GH-10742
Closes GH-10744


# 7ec8ae12 09-Apr-2023 David Carlier

ext/pgsql: pg_trace allow to refine its trace mode via 2 new constants.

- PGSQL_TRACE_SUPPRESS_TIMESTAMPS.
- PGSQL_TRACE_REGRESS_MODE to have a more verbose and observable
output to

ext/pgsql: pg_trace allow to refine its trace mode via 2 new constants.

- PGSQL_TRACE_SUPPRESS_TIMESTAMPS.
- PGSQL_TRACE_REGRESS_MODE to have a more verbose and observable
output to check possible regressions.

Close GH-11041

show more ...


# 05bd1423 05-May-2023 Bob Weinand

Fix GH-11189: Exceeding memory limit in zend_hash_do_resize leaves the array in an invalid state

There are more places in zend_hash.c where the resize happened after some values on the HashT

Fix GH-11189: Exceeding memory limit in zend_hash_do_resize leaves the array in an invalid state

There are more places in zend_hash.c where the resize happened after some values on the HashTable struct were set.
I reordered them all, but writing a test for these would rely on the particular amount of bytes allocated at given points in time.

show more ...


# 84c185c8 15-Apr-2023 David CARLIER

ext/pgsql: pg_cancel_query internal update.

Removing (obsolete) PGrequestCancel usage in favor of the thread-safe
PQcancel/PQfreeCancel pair.

Close GH-11081


# f6c0c60e 30-Apr-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Fix GH-11104: STDIN/STDOUT/STDERR is not available for CLI without a script

I found no reason why this is done this way.
Of course this will allow users to do stupid stuff like
`fclo

Fix GH-11104: STDIN/STDOUT/STDERR is not available for CLI without a script

I found no reason why this is done this way.
Of course this will allow users to do stupid stuff like
`fclose(STDOUT);` etc. but if they type in that code they clearly know
what they're doing...

Close GH-11169.

show more ...


# 81e50b4e 02-May-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Fix GH-11178: Segmentation fault in spl_array_it_get_current_data (PHP 8.1.18)

Dynamic property case in zend_get_property_info() can return NULL for
prop info. This was not handled.

Fix GH-11178: Segmentation fault in spl_array_it_get_current_data (PHP 8.1.18)

Dynamic property case in zend_get_property_info() can return NULL for
prop info. This was not handled.

Closes GH-11182.

show more ...


# d75c1d00 02-May-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Fix GH-11175 and GH-11177: Stream socket timeout undefined behaviour

A negative value like -1 may overflow and cause incorrect results in the
timeout variable, which causes an immediate

Fix GH-11175 and GH-11177: Stream socket timeout undefined behaviour

A negative value like -1 may overflow and cause incorrect results in the
timeout variable, which causes an immediate timeout. As this is caused
by undefined behaviour the exact behaviour depends on the compiler, its
version, and the platform.

A large overflow is also possible, if an extremely large timeout value
is passed we also set an indefinite timeout. This is because the timeout
value is at least a 64-bit number and waiting for UINT64_MAX/1000000
seconds is waiting about 584K years.

Closes GH-11183.

show more ...


# 4ca8daf3 02-May-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Fix GH-9068: Conditional jump or move depends on uninitialised value(s)

This patch preserves the scratch registers of the SysV x86-64 ABI by storing
them to the stack and restoring them

Fix GH-9068: Conditional jump or move depends on uninitialised value(s)

This patch preserves the scratch registers of the SysV x86-64 ABI by storing
them to the stack and restoring them later. We need to do this to prevent the
registers of the caller from being corrupted. The reason these get corrupted
is because the compiler is unaware of the Valgrind replacement function and
thus makes assumptions about the original function regarding registers which
are not true for the replacement function.

For implementation I used a GCC and Clang attribute. A more general
approach would be to use inline assembly but that's also less portable
and quite hacky. This attributes is supported since GCC 7.x, but the
target option is only supported since 11.x. For Clang the target option
does not matter.

Closes GH-10221.

show more ...


# fbf5216c 30-Apr-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Fix too wide OR and AND range inference

There is a typo which causes the AND and OR range inference to infer a
wider range than necessary. Fix this typo. There are many ranges for
wh

Fix too wide OR and AND range inference

There is a typo which causes the AND and OR range inference to infer a
wider range than necessary. Fix this typo. There are many ranges for
which the inference is too wide, I just picked one for AND and one for
OR that I found through symbolic execution.

In this example test, the previous range inferred for test_or was [-27..-1]
instead of [-20..-1].
And the previous range inferred for test_and was [-32..-25]
instead of [-28..-25].

Closes GH-11170.

show more ...


# e2f477c2 28-Apr-2023 ColinHDev

Fix negative indices on empty array not affecting next chosen index

Changed the value of nNextFreeElement in _zend_empty_array from 0 to
ZEND_LONG_MIN.

Fixes GH-11154
Closes

Fix negative indices on empty array not affecting next chosen index

Changed the value of nNextFreeElement in _zend_empty_array from 0 to
ZEND_LONG_MIN.

Fixes GH-11154
Closes GH-11157

show more ...


# bf727cf5 01-May-2023 Tim Düsterhus

RFC: Make unserialize() emit a warning for trailing bytes (#9630)


# dc20cd9c 01-May-2023 Ilija Tovilo

Endless recursion when using + on array in foreach

This reverts commit 84b4020eb4a8ebc45cb80164d4589cbf818f47f2.

Fixes GH-11171


# 5ad6571a 28-Apr-2023 Ilija Tovilo

Allow aliasing namespaces containing reserved class names

This reverts commit b9f7123c5e4ccdc3c381ab949ff01e3c14f3465c.

Fixes GH-11152
Closes GH-11153


# 8bf2d587 28-Apr-2023 Ilija Tovilo

Propagate STREAM_DISABLE_OPEN_BASEDIR src flag to php_stream_stat_path_ex

Otherwise we can get open_basedir warnings from the stat call while still
performing the actual copy.

F

Propagate STREAM_DISABLE_OPEN_BASEDIR src flag to php_stream_stat_path_ex

Otherwise we can get open_basedir warnings from the stat call while still
performing the actual copy.

Fixes GH-11138
Closes GH-11156

show more ...


# 6a9061e0 17-Mar-2023 David CARLIER

Fix GH-9344: pgsql pipeline mode proposal.

Adding pg_enter_pipeline_mode, pg_exit_pipeline_mode,
pg_pipeline_sync and pg_pipeline_status.

Close GH-10868


1...<<41424344454647484950>>...619