]> granicus.if.org Git - php/log
php
4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 10 Jul 2020 07:47:59 +0000 (09:47 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix some memory bugs in ldap.c

4 years agoFix some memory bugs in ldap.c
Paweł Tomulik [Fri, 3 Jul 2020 00:11:44 +0000 (02:11 +0200)]
Fix some memory bugs in ldap.c

4 years agoPrevent parallel test conflicts
Christoph M. Becker [Thu, 9 Jul 2020 10:35:31 +0000 (12:35 +0200)]
Prevent parallel test conflicts

Both tests used the same folder, which could clash in case the tests
are run simultaneously.

4 years agoSwitch back to FREE_UNFETCHED_OP_DATA
Nikita Popov [Thu, 9 Jul 2020 09:54:08 +0000 (11:54 +0200)]
Switch back to FREE_UNFETCHED_OP_DATA

Some of the code paths leading to this do not fetch op data.
Hopefully this fixes the release build failure.

4 years agoFix bug #79599 in a different way
Nikita Popov [Thu, 9 Jul 2020 09:11:24 +0000 (11:11 +0200)]
Fix bug #79599 in a different way

Move the emission of the undefined variable notice before the
array separation.

4 years agoRevert "Fixed bug #97599 (coredump in set_error_handler)"
Nikita Popov [Thu, 9 Jul 2020 08:51:30 +0000 (10:51 +0200)]
Revert "Fixed bug #97599 (coredump in set_error_handler)"

This reverts commit ccd41e083359cf6dd264f88806dce4cc49d9358e.

This causes a large performance regression when notices are thrown
and large arrays are in scope, see bug #79794.

4 years agoRevert "Partial fixed bug #79649 (Altering disable_functions from module init corrupt...
Derick Rethans [Thu, 9 Jul 2020 08:48:35 +0000 (09:48 +0100)]
Revert "Partial fixed bug #79649 (Altering disable_functions from module init corrupts memory)"

This reverts commit a297c09da5ad355d53a8e8ea72655a06d15b7bc7.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 8 Jul 2020 09:21:48 +0000 (11:21 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix bug #79787

4 years agoFix bug #79787
XXiang [Sat, 4 Jul 2020 14:12:57 +0000 (22:12 +0800)]
Fix bug #79787

Closes GH-5807.

4 years ago[ci skip] Merge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Wed, 8 Jul 2020 08:39:47 +0000 (10:39 +0200)]
[ci skip] Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Report len as -1 instead of INT_MAX

4 years agoReport len as -1 instead of INT_MAX
Nikita Popov [Wed, 3 Jun 2020 08:15:54 +0000 (10:15 +0200)]
Report len as -1 instead of INT_MAX

Per docs it should be -1. And would be on 32-bit systems, but
not on 64-bit systems.

(cherry picked from commit 39111585a2f8e40e72bdc662eb8b2e3c19e93615)

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Sara Golemon [Tue, 7 Jul 2020 19:34:08 +0000 (19:34 +0000)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Prep for 7.2.33
  Prep NEWS for 7.2.32 release

4 years agoMerge branch 'PHP-7.2' into PHP-7.3
Sara Golemon [Tue, 7 Jul 2020 19:33:11 +0000 (19:33 +0000)]
Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Prep for 7.2.33
  Prep NEWS for 7.2.32 release

4 years agoPrep for 7.2.33
Sara Golemon [Tue, 7 Jul 2020 19:31:32 +0000 (19:31 +0000)]
Prep for 7.2.33

4 years agoPrep NEWS for 7.2.32 release PHP-7.2.32
Sara Golemon [Tue, 7 Jul 2020 19:31:05 +0000 (19:31 +0000)]
Prep NEWS for 7.2.32 release

4 years agoFixed bug #79793
Nikita Popov [Tue, 7 Jul 2020 14:24:13 +0000 (16:24 +0200)]
Fixed bug #79793

Make sure the string key is not released while throwing the
undefined index warning.

4 years agoFixed bug #79784
Nikita Popov [Tue, 7 Jul 2020 12:22:58 +0000 (14:22 +0200)]
Fixed bug #79784

The fix here is essentially the same as for bug #78598, just for
the undefined variable notice, rather than the undefined index one.

4 years ago[ci skip] Merge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 7 Jul 2020 11:56:22 +0000 (13:56 +0200)]
[ci skip] Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Don't use deprecated curly brace offset syntax

4 years agoDon't use deprecated curly brace offset syntax
Christoph M. Becker [Tue, 7 Jul 2020 11:21:26 +0000 (13:21 +0200)]
Don't use deprecated curly brace offset syntax

(cherry picked from commit 7ec3aa1871074f5de25865af42c984a7668eb85f)

Better safe than sorry in case someone ever builds PHP 7.3 with a
future version of PHP SDK with bundled PHP 8.

4 years agoDon't use deprecated curly brace offset syntax
Christoph M. Becker [Tue, 7 Jul 2020 11:21:26 +0000 (13:21 +0200)]
Don't use deprecated curly brace offset syntax

4 years agoFixed bug #78598
Nikita Popov [Tue, 4 Feb 2020 13:19:07 +0000 (14:19 +0100)]
Fixed bug #78598

When performing an RW modification of an array offset, the undefined
offset warning may call an error handler / OB callback, which may
destroy the array we're supposed to change. Detect this by temporarily
incrementing the reference count. If we find that the array has been
modified/destroyed in the meantime, we do nothing -- the execution
model here would be that the modification has happened on the destroyed
version of the array.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 7 Jul 2020 09:59:20 +0000 (11:59 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79792

4 years agoFixed bug #79792
Nikita Popov [Tue, 7 Jul 2020 09:57:01 +0000 (11:57 +0200)]
Fixed bug #79792

We need to remove the iterators even if the array is empty (we
will not create one if the first place, but the array may become
empty after the fact).

4 years agoFixed bug #79779
Nikita Popov [Tue, 7 Jul 2020 08:27:22 +0000 (10:27 +0200)]
Fixed bug #79779

ASSIGN_OBJ_REF was not handling in zend_wrong_string_offset.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 7 Jul 2020 08:20:11 +0000 (10:20 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79778

4 years agoFixed bug #79778
Nikita Popov [Tue, 7 Jul 2020 08:11:34 +0000 (10:11 +0200)]
Fixed bug #79778

In the interest of avoiding side-effects during dumping, I'm
replacing the value with a <constant ast> string instead of
performing an update constant operation.

4 years agoFixed bug #79783
Nikita Popov [Tue, 7 Jul 2020 07:55:28 +0000 (09:55 +0200)]
Fixed bug #79783

Make sure we don't drop the by-reference check when passing the
result of a VM builtin function.

4 years agoFix tests for x86 Windows
Christoph M. Becker [Fri, 3 Jul 2020 08:31:17 +0000 (10:31 +0200)]
Fix tests for x86 Windows

`st_dev` deliberately overflows on such systems, cf.
<http://svn.php.net/viewvc?view=revision&revision=350100>.

4 years agoSkip test if SeCreateSymbolicLinkPrivilege is not given
Christoph M. Becker [Fri, 3 Jul 2020 07:02:55 +0000 (09:02 +0200)]
Skip test if SeCreateSymbolicLinkPrivilege is not given

4 years agoEnable readlink_realpath_* tests on Windows
Christoph M. Becker [Thu, 2 Jul 2020 14:36:16 +0000 (16:36 +0200)]
Enable readlink_realpath_* tests on Windows

We modify _basic1.phpt so it runs on Windows as well.  The other test
cases hit the issue that `readlink()` fails normally for regular files,
but succeeds on Windows[1].  Therefore, we split these tests, but still
fix the skip reasons.

[1] <http://svn.php.net/viewvc?view=revision&revision=350097>

4 years agoEnable most lstat_stat_* tests on Windows
Christoph M. Becker [Thu, 2 Jul 2020 11:17:57 +0000 (13:17 +0200)]
Enable most lstat_stat_* tests on Windows

Most of these have been skipped on Windows for no good reason (`lstat`
is available there as of PHP 4).  Several others would only fail,
because the `blksize` and `blocks` elements are always `-1` on Windows,
which can easily be fixed by using `%i` format specifiers instead of
`%d`.

4 years agoUpdate php_version.h
Christoph M. Becker [Thu, 2 Jul 2020 13:30:13 +0000 (15:30 +0200)]
Update php_version.h

That has apparently been overlooked.

4 years agoExtract test helper function for SeCreateSymbolicLinkPrivilege check
Christoph M. Becker [Thu, 2 Jul 2020 09:56:41 +0000 (11:56 +0200)]
Extract test helper function for SeCreateSymbolicLinkPrivilege check

4 years agoHandle SO_ options only at SOL_SOCKET level
Nikita Popov [Thu, 2 Jul 2020 08:50:27 +0000 (10:50 +0200)]
Handle SO_ options only at SOL_SOCKET level

These options may have the same value as options at other levels.

This issue showed up on ppc64el.

4 years agoAllow different error message for errno 58
Nikita Popov [Wed, 1 Jul 2020 15:19:32 +0000 (17:19 +0200)]
Allow different error message for errno 58

Apparently this is EDEADLOCK on some systems.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 30 Jun 2020 15:33:33 +0000 (17:33 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Remove bogus generator iterator dtor

4 years agoRemove bogus generator iterator dtor
Nikita Popov [Tue, 30 Jun 2020 15:28:47 +0000 (17:28 +0200)]
Remove bogus generator iterator dtor

Fixes a use-after-free encountered in Symfony's SecurityBundle.
I don't have a reproducer for this, and believe the issue can only
occur if we leak an iterator (the leak is a separate issue).

We should not free the generator iterator here, because we do not
own it. The code that fetched the iterator is responsible for
releasing it. In the rare case where we do hit this code-path,
we cause a use-after-free.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Tue, 30 Jun 2020 10:25:29 +0000 (12:25 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix leak when setting cyclic previous exception in finally

4 years agoFix leak when setting cyclic previous exception in finally
Nikita Popov [Tue, 30 Jun 2020 10:22:41 +0000 (12:22 +0200)]
Fix leak when setting cyclic previous exception in finally

A curious exception handling pattern found in Symfony's HttpClient.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 30 Jun 2020 08:47:49 +0000 (10:47 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #70362: Can't copy() large 'data://' with open_basedir

4 years agoFix #70362: Can't copy() large 'data://' with open_basedir
Christoph M. Becker [Thu, 5 Mar 2020 11:20:04 +0000 (12:20 +0100)]
Fix #70362: Can't copy() large 'data://' with open_basedir

open_basedir is only relevant for plain files, so there is no need to
check it for other URL wrappers.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 29 Jun 2020 17:05:37 +0000 (19:05 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #63208: BSTR to PHP string conversion not binary safe

4 years agoFix #63208: BSTR to PHP string conversion not binary safe
Christoph M. Becker [Mon, 29 Jun 2020 15:38:14 +0000 (17:38 +0200)]
Fix #63208: BSTR to PHP string conversion not binary safe

A `BSTR` is similar to a `zend_string`; it stores the length of the
string just before the actual string, and thus the string may contain
NUL bytes.  However, `php_com_olestring_to_string()` is supposed to
deal with arbitrary `OLECHAR*`s which may not be `BSTR`s, so we
introduce `php_com_bstr_to_string()` and use it for the only case where
we actually have to deal with `BSTR`s which may contain NUL bytes.

Contrary to `php_com_olestring_to_string()` we return a `zend_string`,
so we can save the re-allocation when converting to a `zval`.

We also cater to `php_com_string_to_olestring()` not being binary safe,
with basically the same fix we did for `php_com_olestring_to_string()`.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Mon, 29 Jun 2020 15:46:31 +0000 (17:46 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79756: finfo_file crash (FILEINFO_MIME)

4 years agoFix #79756: finfo_file crash (FILEINFO_MIME)
Christoph M. Becker [Mon, 29 Jun 2020 14:10:33 +0000 (16:10 +0200)]
Fix #79756: finfo_file crash (FILEINFO_MIME)

If `ctime` or `asctime` return `NULL`, we must not attempt to copy the
buffer, but rather return `NULL` as well.

4 years agoDon't inline static call to instance method
Nikita Popov [Mon, 29 Jun 2020 07:52:37 +0000 (09:52 +0200)]
Don't inline static call to instance method

Fixes the failure in bug79740.phpt with opcache.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 26 Jun 2020 10:29:23 +0000 (12:29 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79741

4 years agoFixed bug #79741
Nikita Popov [Fri, 26 Jun 2020 10:26:46 +0000 (12:26 +0200)]
Fixed bug #79741

4 years agoFixed bug #79740
Nikita Popov [Fri, 26 Jun 2020 08:31:55 +0000 (10:31 +0200)]
Fixed bug #79740

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 24 Jun 2020 12:42:52 +0000 (14:42 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79030 Use usec from apache request time

4 years agoFixed bug #79030 Use usec from apache request time
Herbert256 [Wed, 24 Jun 2020 07:44:35 +0000 (09:44 +0200)]
Fixed bug #79030 Use usec from apache request time

Don't unnecessarily truncate to milliseconds.

Closes GH-5760.

4 years agoHandle *0 / *1 more consistently
Nikita Popov [Wed, 24 Jun 2020 10:20:05 +0000 (12:20 +0200)]
Handle *0 / *1 more consistently

Avoid throwing a DES salt deprecation warning if the libc crypt
implementation is used.

4 years agoFix potential environment variable deadlock
Christoph M. Becker [Wed, 24 Jun 2020 09:43:04 +0000 (11:43 +0200)]
Fix potential environment variable deadlock

We have to unlock the environment before bailing out.

4 years agoFix #69804: ::getStaticPropertyValue() throws on protected props
Christoph M. Becker [Wed, 15 Apr 2020 13:15:21 +0000 (15:15 +0200)]
Fix #69804: ::getStaticPropertyValue() throws on protected props

`ReflectionClass` allows reading of the values of private and protected
constants, and also to get private and protected static methods.
Therefore getting the values of private and protected static properties
is also permissible, especially since `::getStaticProperties()` already
allows to do so.

We also allow ::setStaticPropertyValue() to modify private and
protected properties, because otherwise this method is useless, as
modifying public properties can be done directly.

4 years agoFix #79487: ::getStaticProperties() ignores property modifications
Christoph M. Becker [Wed, 24 Jun 2020 08:03:46 +0000 (10:03 +0200)]
Fix #79487: ::getStaticProperties() ignores property modifications

When retrieving the static class properties via reflection, we have to
cater to possible modifications.

4 years agoRevert "Fix #79487: ::getStaticProperties() ignores property modifications"
Christoph M. Becker [Tue, 23 Jun 2020 17:28:51 +0000 (19:28 +0200)]
Revert "Fix #79487: ::getStaticProperties() ignores property modifications"

This reverts commit a895bb6885fbceea3e8375816969d5510d8d082e.

4 years agoFix #79487: ::getStaticProperties() ignores property modifications
Christoph M. Becker [Tue, 23 Jun 2020 16:34:07 +0000 (18:34 +0200)]
Fix #79487: ::getStaticProperties() ignores property modifications

When retrieving the static class properties via reflection, we have to
cater to possible modifications.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 23 Jun 2020 13:58:49 +0000 (15:58 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #55857: ftp_size on large files

4 years agoFix #55857: ftp_size on large files
Christoph M. Becker [Tue, 23 Jun 2020 13:17:31 +0000 (15:17 +0200)]
Fix #55857: ftp_size on large files

`atol()` returns a `long` which is not the same as `zend_long` on
LLP64; we use `ZEND_ATOL()` instead.

There is no need for a new test case, since filesize_large.phpt already
tests for that behavior; unfortunately, the FTP test suite relies on
`pcntl_fork()` and therefore cannot be run on Windows.

4 years agoRestore XFAIL on fpm test
Nikita Popov [Tue, 23 Jun 2020 10:35:11 +0000 (12:35 +0200)]
Restore XFAIL on fpm test

Still fails intermittently.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 23 Jun 2020 08:32:25 +0000 (10:32 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  7.3 is now 7.3.21-dev

4 years ago7.3 is now 7.3.21-dev
Christoph M. Becker [Tue, 23 Jun 2020 08:29:42 +0000 (10:29 +0200)]
7.3 is now 7.3.21-dev

4 years agoPHP-7.4 is now 7.4.9-dev
Derick Rethans [Tue, 23 Jun 2020 07:46:37 +0000 (08:46 +0100)]
PHP-7.4 is now 7.4.9-dev

4 years agoSplHeap: Avoid memcpy on overlapping pointer
Anatol Belski [Sun, 21 Jun 2020 20:16:56 +0000 (22:16 +0200)]
SplHeap: Avoid memcpy on overlapping pointer

Check if data would overlap and also add an assert. Previous
implementations didn't have this issue, as the direct assignment was
used.

Signed-off-by: Anatol Belski <ab@php.net>
4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 19 Jun 2020 15:32:00 +0000 (17:32 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fixed bug #79570

4 years agoFixed bug #79570
Böszörményi Zoltán [Fri, 19 Jun 2020 12:31:28 +0000 (14:31 +0200)]
Fixed bug #79570

Use the same logic for getgrgid_r, getpwnam_r and getpwuid_r
as for getgrnam_r in #75696

Closes GH-5740.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Fri, 19 Jun 2020 08:47:01 +0000 (10:47 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

4 years agoFixed bug #79710
Nikita Popov [Fri, 19 Jun 2020 08:46:02 +0000 (10:46 +0200)]
Fixed bug #79710

Make sure we don't use zresource after the stream has been destroyed.

4 years agoGenerate temporary config file when generating certificates
Nikita Popov [Fri, 19 Jun 2020 07:43:56 +0000 (09:43 +0200)]
Generate temporary config file when generating certificates

The putenv trick doesn't work on ZTS Windows, so generate a new
openssl config every time.

4 years agocheck for broken libzip versions
Remi Collet [Thu, 18 Jun 2020 14:45:39 +0000 (16:45 +0200)]
check for broken libzip versions

Closes GH-5738.

4 years agoUpdate libzip on macos
Nikita Popov [Thu, 18 Jun 2020 14:25:16 +0000 (16:25 +0200)]
Update libzip on macos

We need libzip 1.7.1, because libzip 1.7.0 is broken.

Closes GH-5737.

4 years agoFix race condition in FPM tests
Nikita Popov [Thu, 18 Jun 2020 15:01:29 +0000 (17:01 +0200)]
Fix race condition in FPM tests

The newly de-XFAILed tests have a race condition. Make sure we
terminate only after expecting all the log lines.

4 years agoUn-XFAIL FPM tests
Nikita Popov [Thu, 18 Jun 2020 13:59:32 +0000 (15:59 +0200)]
Un-XFAIL FPM tests

These were XFAILed due to a bug in the log implementation that
caused intermittent failures. However, this issue is supposed to
be resolved in the meantime, so try dropping the XFAIL marker.

4 years agoDowngrade server security level in security level test
Nikita Popov [Thu, 18 Jun 2020 13:54:02 +0000 (15:54 +0200)]
Downgrade server security level in security level test

We want to test the client side error here, so make sure the
server side can start up successfully.

4 years agoAdd SubjectAltName support to certificate generator
Nikita Popov [Thu, 18 Jun 2020 13:34:33 +0000 (15:34 +0200)]
Add SubjectAltName support to certificate generator

And switch tests using SAN certificates to the generator.

This is ugly, but there doesn't seem to be a more direct way
to privide SAN in PHP.

4 years agoAdd missing NEWS entry
Christoph M. Becker [Thu, 18 Jun 2020 13:28:19 +0000 (15:28 +0200)]
Add missing NEWS entry

I forgot to update NEWS after merging back then.

4 years agoGenerate certificates for bug69215.phpt
Nikita Popov [Thu, 18 Jun 2020 12:58:48 +0000 (14:58 +0200)]
Generate certificates for bug69215.phpt

4 years agoGenerate certificate for bug68920.phpt
Nikita Popov [Thu, 18 Jun 2020 12:49:15 +0000 (14:49 +0200)]
Generate certificate for bug68920.phpt

The certificate really doesn't matter here, but it still needs to
comply with security level...

4 years agoGenerate certificate for bug65729.pem
Nikita Popov [Thu, 18 Jun 2020 12:43:19 +0000 (14:43 +0200)]
Generate certificate for bug65729.pem

Make this test pass under security level 2.

4 years agoRevert "Fix tests regarding OpenSSL security_level"
Nikita Popov [Thu, 18 Jun 2020 12:21:04 +0000 (14:21 +0200)]
Revert "Fix tests regarding OpenSSL security_level"

This reverts commit b281493503401a2b5c45c11fcd0498d8448998c2.

4 years agoDon't generate spurious warning is security_level not supported
Nikita Popov [Thu, 18 Jun 2020 12:20:23 +0000 (14:20 +0200)]
Don't generate spurious warning is security_level not supported

People should not have to worry about the used openssl version
when downgrading security_level.

4 years agoFix tests regarding OpenSSL security_level
Christoph M. Becker [Thu, 18 Jun 2020 11:28:09 +0000 (13:28 +0200)]
Fix tests regarding OpenSSL security_level

The `security_level` stream option is only available as of OpenSSL
1.1.0, so we only set it for these versions.  Older OpenSSL versions
do not have security levels at all.

4 years agoMigrate some tests to certificate generator
Nikita Popov [Thu, 18 Jun 2020 08:32:33 +0000 (10:32 +0200)]
Migrate some tests to certificate generator

This migrates all the tests using ext/openssl/tests/streams_crypto_method.pem
to the certificate generator, so we can easily adjust needed parameters.
In particular, this makes the cert security level 2 compatible.

However, we still need to downgrade security_level to 1 in a number
of tests, because they are testing TLS < 1.2 connections.

4 years agoDon't use ternary in ini default
Nikita Popov [Thu, 18 Jun 2020 08:15:53 +0000 (10:15 +0200)]
Don't use ternary in ini default

We use sizeof() on ini defaults, so this isn't safe. I can't reproduce
the failures locally, but I expect this to fix the asan jobs.

4 years agoRemove bug48187.phpt
Nikita Popov [Thu, 18 Jun 2020 08:07:45 +0000 (10:07 +0200)]
Remove bug48187.phpt

Saw a spurious failure from this one on azure macos, presumably
the process got interrupted in the middle and waited for more than
one second to resume.

After looking a bit more closely, this test doesn't actually test
what bug #48187 reported, because there is no DateTime::diff()
anywhere to be found. This test was also added speculatively,
because the root cause was never diagnosed, and the problems seems
to have resolved itself at some point.

As such, I'm simply dropping this test, rather than figuring out
how to make it more robust.

4 years agoUse sha256 as digest algorithm in certificate generator
Nikita Popov [Wed, 17 Jun 2020 20:08:54 +0000 (22:08 +0200)]
Use sha256 as digest algorithm in certificate generator

This makes the generated certificates compatible with security
level 2, which is apparently the default on Ubuntu 20.04.

Unfortunately this does not fix all tests, because some are using
pre-generated certificates.

4 years agoSuppress zend signals check in two readline tests
Nikita Popov [Wed, 17 Jun 2020 15:13:01 +0000 (17:13 +0200)]
Suppress zend signals check in two readline tests

Installing a callback handler may cause libedit to register new
signals during the request.

4 years agoAdd mbregex skipif
Nikita Popov [Wed, 17 Jun 2020 07:35:02 +0000 (09:35 +0200)]
Add mbregex skipif

4 years agoFix non-default syntax in mb_ereg_search()
Nikita Popov [Tue, 16 Jun 2020 12:31:29 +0000 (14:31 +0200)]
Fix non-default syntax in mb_ereg_search()

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Sat, 13 Jun 2020 16:32:01 +0000 (18:32 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79687: Sony picture - PHP Warning - Make, Model, MakerNotes

4 years agoFix #79687: Sony picture - PHP Warning - Make, Model, MakerNotes
Christoph M. Becker [Sat, 13 Jun 2020 12:09:28 +0000 (14:09 +0200)]
Fix #79687: Sony picture - PHP Warning - Make, Model, MakerNotes

Even if the length of a maker note does not match our expectations
(either because the maker note is corrupted, or because our
expectations do not quite match reality), there is no need to let
parsing fail; we can still go on parsing the other meta information.

4 years agoDrop freetype from i386
Nikita Popov [Fri, 12 Jun 2020 13:12:15 +0000 (15:12 +0200)]
Drop freetype from i386

For some reason this seems to pick up the amd64 library (though
we do install the i386 one).

4 years agoUse shared setup.yml on azure
Nikita Popov [Fri, 12 Jun 2020 13:09:43 +0000 (15:09 +0200)]
Use shared setup.yml on azure

Make sure things stay synchronized between different x64 jobs.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Fri, 12 Jun 2020 12:07:16 +0000 (14:07 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix #79676: imagescale adds black border with IMG_BICUBIC

4 years agoFix #79676: imagescale adds black border with IMG_BICUBIC
Christoph M. Becker [Fri, 5 Jun 2020 14:36:00 +0000 (16:36 +0200)]
Fix #79676: imagescale adds black border with IMG_BICUBIC

We have to loop over all image pixels to avoid the black border.  This
is also done in external libgd in `_gdScaleOneAxis` and `_gdScalePass`.

4 years agoSuppress deprecation warning in sockets.c
Nikita Popov [Fri, 12 Jun 2020 10:35:02 +0000 (12:35 +0200)]
Suppress deprecation warning in sockets.c

This one was quite a journey...

4 years agosqlite3: Fix possible use after free
Anatol Belski [Thu, 11 Jun 2020 11:09:00 +0000 (13:09 +0200)]
sqlite3: Fix possible use after free

Exception should be thrown before the db handle is destroyed.
The backtrace excerpt

==26628== Invalid read of size 4
==26628==    at 0x53C49E3: sqlite3_errmsg (in /usr/lib64/libsqlite3.so.0.8.6)
==26628==    by 0x38C4E9: zim_sqlite3_open (sqlite3.c:142)
==26628==    by 0x8977BF: ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:1618)
==26628==    by 0x8F801E: execute_ex (zend_vm_execute.h:53824)
==26628==    by 0x8FC0BB: zend_execute (zend_vm_execute.h:57920)
==26628==    by 0x828F54: zend_execute_scripts (zend.c:1672)
==26628==    by 0x793C2C: php_execute_script (main.c:2621)
==26628==    by 0x8FEA44: do_cli (php_cli.c:964)
==26628==    by 0x8FF9DC: main (php_cli.c:1359)

Signed-off-by: Anatol Belski <ab@php.net>
4 years agoUpdate NEWS wrt. bug 79681
Christoph M. Becker [Wed, 10 Jun 2020 14:44:17 +0000 (16:44 +0200)]
Update NEWS wrt. bug 79681

4 years agoFix #79681: mime_content_type/finfo returning incorrect mimetype
Christoph M. Becker [Tue, 9 Jun 2020 14:22:55 +0000 (16:22 +0200)]
Fix #79681: mime_content_type/finfo returning incorrect mimetype

We backport the respective fix for MP3s[1].

[1] <https://github.com/file/file/commit/5a55569a35eff686d4b7400b219d380f7c622890>

4 years agoExplicitly start postgres on azure
Nikita Popov [Wed, 10 Jun 2020 11:04:14 +0000 (13:04 +0200)]
Explicitly start postgres on azure

Seems to be necessary now...