]> granicus.if.org Git - php/log
php
5 years agoFix leak in SplObjectStorage unserialization
Nikita Popov [Mon, 16 Sep 2019 11:01:59 +0000 (13:01 +0200)]
Fix leak in SplObjectStorage unserialization

The result of php_var_unserialize always needs to be destroyed,
even if the call failed.

5 years agoStick with zend_long for ABI compatibility
Christoph M. Becker [Sun, 15 Sep 2019 13:11:25 +0000 (15:11 +0200)]
Stick with zend_long for ABI compatibility

Cf. <https://github.com/php/php-src/pull/4700#issuecomment-531515689>.

5 years agoFix #78535: auto_detect_line_endings value not parsed as bool
bugreportuser [Thu, 12 Sep 2019 18:44:08 +0000 (12:44 -0600)]
Fix #78535: auto_detect_line_endings value not parsed as bool

5 years agoNEWS
Kalle Sommer Nielsen [Thu, 12 Sep 2019 03:50:53 +0000 (06:50 +0300)]
NEWS

5 years agoFixed bug #78442 ('Illegal component' on exif_read_data since PHP7)
Kalle Sommer Nielsen [Thu, 12 Sep 2019 03:21:39 +0000 (06:21 +0300)]
Fixed bug #78442 ('Illegal component' on exif_read_data since PHP7)

5 years agoBump for 7.2.24
Sara Golemon [Tue, 10 Sep 2019 17:03:27 +0000 (13:03 -0400)]
Bump for 7.2.24

5 years agoRaise minimal GCC version,
Remi Collet [Tue, 10 Sep 2019 14:28:35 +0000 (16:28 +0200)]
Raise minimal GCC version,
Test with 4.8 is OK
With 4.4: error: #pragma GCC diagnostic not allowed inside functions

5 years agoDrop regression test
Christoph M. Becker [Tue, 10 Sep 2019 08:07:39 +0000 (10:07 +0200)]
Drop regression test

The state returned by `sodium_crypto_generichash_init()` has to be
regarded as opaque byte string; neither its size nor its exact
structure are fixed, and actually vary for diffent libsodium versions.
Therefore we drop the test altogether.

5 years agoFix bug #72884 isCloneable() on SplFileObject should return false
CHU Zhaowei [Sun, 8 Sep 2019 09:29:32 +0000 (09:29 +0000)]
Fix bug #72884 isCloneable() on SplFileObject should return false

5 years agoFix #78510: Partially uninitialized buffer returned by sodium_crypto_generichash_init()
Christoph M. Becker [Mon, 9 Sep 2019 13:30:28 +0000 (15:30 +0200)]
Fix #78510: Partially uninitialized buffer returned by sodium_crypto_generichash_init()

Backport jedisct1/libsodium.php@28d13bf437cb969a0583031fc7ac54c5a8dc8116.

5 years agoFix #41997: SP call yields additional empty result set
Christoph M. Becker [Tue, 6 Aug 2019 12:30:41 +0000 (14:30 +0200)]
Fix #41997: SP call yields additional empty result set

When stored procedures are called, the "final result set is a status
result that includes no result set".  Calling `::nextRowset()` on the
actual last result set should return FALSE, since there is actually no
further result set to be processed.

5 years agoFix opcache return type for hash_update_stream
Tyson Andre [Tue, 3 Sep 2019 01:32:24 +0000 (21:32 -0400)]
Fix opcache return type for hash_update_stream

It can return false if the resource type is wrong.

```
php > var_export(hash_update_stream(hash_init('md5'),
        imagecreate(1,1)));

Warning: hash_update_stream(): supplied resource is not a valid stream
resource in php shell code on line 1
false
```

The return types were initially added in
c88ffa9a5673cb3141660626ba1921671f0b84d6

5 years agoFix #76577: outdated documentation concerning track_errors
Christoph M. Becker [Mon, 2 Sep 2019 13:05:01 +0000 (15:05 +0200)]
Fix #76577: outdated documentation concerning track_errors

5 years agoFix pkg-config version constraint for ICU
Nikita Popov [Mon, 2 Sep 2019 07:36:20 +0000 (09:36 +0200)]
Fix pkg-config version constraint for ICU

On PHP 7.2 our minimum ICU version is 4.0, not 40.

5 years agoFixed bug #78469
Sergei Turchanov [Wed, 28 Aug 2019 03:05:14 +0000 (13:05 +1000)]
Fixed bug #78469

fcgi_accept_request function is supposed to call a FastCGI implementation's
on_accept hook when entering an "accepting" stage (that is right before
calling "accept"). This hook implementation (fpm_request_accepting) updates
a worker state to an "accepting" state which is effectively an "Idle" state,
and updates counters on the scoreboard of the corresponding pool (idle++,
active--).

But this is not done when listening for client connections on a named pipe on
Windows platform. In that case a combination of
ConnectNamedPipe/WaitForSingleObject is used (to be able to catch in_shutdown
as far as I understand), but it is nonetheless functionally equivalent to
"accept" call. Also by not calling on_hook neither a worker's state is updated
to "accepting" state nor scoreboard counters are updated.

5 years agoFix use-after-free of immediately invoked closure with extra args
Nikita Popov [Thu, 29 Aug 2019 10:30:39 +0000 (12:30 +0200)]
Fix use-after-free of immediately invoked closure with extra args

5 years agoFix #78473: odbc_close() closes arbitrary resources
Christoph M. Becker [Wed, 28 Aug 2019 15:51:57 +0000 (17:51 +0200)]
Fix #78473: odbc_close() closes arbitrary resources

We have to bail out, if an invalid resource is given.  For consistency
with the other `zend_fetch_resource(2)` calls, we return `FALSE`.

5 years agoUpdate SDK version for AppVeyor
Christoph M. Becker [Tue, 27 Aug 2019 11:34:35 +0000 (13:34 +0200)]
Update SDK version for AppVeyor

5 years agoRemove properties HT from nested GC data
Nikita Popov [Mon, 26 Aug 2019 15:48:05 +0000 (17:48 +0200)]
Remove properties HT from nested GC data

The properties HT may be a GC root itself, so we need to remove it.
I'm not sure this issue actually applies to PHP 7.2, but committing
it there to be safe. As seen from the test case, the handling here
is rather buggy on 7.2.

5 years agoAlso fix signature for passthru
Tyson Andre [Sun, 25 Aug 2019 15:02:28 +0000 (11:02 -0400)]
Also fix signature for passthru

Backported from a1a8d144854acb1c891cf0c21abb0f612b1d8de7
https://www.php.net/manual/en/function.passthru.php#refsect1-function.passthru-returnvalues

`passthru()` is false with invalid args
`passthru('command')` is null.

5 years agoFix opcache optimizer info for time_nanosleep
Tyson Andre [Sun, 25 Aug 2019 14:48:52 +0000 (10:48 -0400)]
Fix opcache optimizer info for time_nanosleep

This can also return an array. See
https://www.php.net/manual/en/function.time-nanosleep.php#refsect1-function.time-nanosleep-returnvalues

> If the delay was interrupted by a signal, an associative array will be
returned with the components:
>
> - seconds - number of seconds remaining in the delay
> - nanoseconds - number of nanoseconds remaining in the delay

Sending a SIGUSR1 to the below program would trigger this behavior.

```
pcntl_signal(\SIGUSR1, function ($signo, $signinfo) {
    echo "Handling a signal $signo\n";
});
echo "Sleeping for 100 seconds\n";
var_export(time_nanosleep(100, 0));
```

The incomplete signature existed since c88ffa9a5.
No phpt tests existed for time_nanosleep returning an array

5 years agoFix overflow in memory limit checks
Nikita Popov [Mon, 26 Aug 2019 08:23:23 +0000 (10:23 +0200)]
Fix overflow in memory limit checks

Due to overflows in the memory limit checks, we were missing cases
where the allocation size was close to the address space size, and
caused an OOM condition rather than a memory limit error.

5 years agoMerge branch 'PHP-7.1' into PHP-7.2
Stanislav Malyshev [Mon, 26 Aug 2019 02:20:59 +0000 (19:20 -0700)]
Merge branch 'PHP-7.1' into PHP-7.2

* PHP-7.1:
  Fix #75457: heap-use-after-free in php7.0.25

5 years agoFix #75457: heap-use-after-free in php7.0.25
Christoph M. Becker [Fri, 16 Aug 2019 12:29:19 +0000 (14:29 +0200)]
Fix #75457: heap-use-after-free in php7.0.25

Backport <https://vcs.pcre.org/pcre?view=revision&revision=1638>.

5 years agoMerge branch 'PHP-7.1' into PHP-7.2
Stanislav Malyshev [Sun, 25 Aug 2019 06:15:36 +0000 (23:15 -0700)]
Merge branch 'PHP-7.1' into PHP-7.2

* PHP-7.1:
  Fix CVE-2019-13224: don't allow different encodings for onig_new_deluxe()
  set version for release

5 years agoFix CVE-2019-13224: don't allow different encodings for onig_new_deluxe()
Stanislav Malyshev [Sun, 25 Aug 2019 06:11:45 +0000 (23:11 -0700)]
Fix CVE-2019-13224: don't allow different encodings for onig_new_deluxe()

Backport from https://github.com/kkos/oniguruma/commit/0f7f61ed1b7b697e283e37bd2d731d0bd57adb55

5 years agoSuppress deprecation warning on IDNA2003 ICU methods for clang
Christoph M. Becker [Fri, 23 Aug 2019 09:14:18 +0000 (11:14 +0200)]
Suppress deprecation warning on IDNA2003 ICU methods for clang

5 years agofix the problem for connect_attr, set db condition, and add a new attribute _server_host
Qianqian Bu [Mon, 12 Aug 2019 02:00:31 +0000 (04:00 +0200)]
fix the problem for connect_attr, set db condition, and add a new attribute _server_host

5 years agoFix #78220: Can't access OneDrive folder
Christoph M. Becker [Mon, 19 Aug 2019 17:44:37 +0000 (19:44 +0200)]
Fix #78220: Can't access OneDrive folder

As of Windows 1903, when the OneDrive on-demand feature is enabled, the
OneDrive folder is reported as reparse point by `FindFirstFile()`, but
trying to get information about the reparse point using
`DeviceIoControl()` fails with `ERROR_NOT_A_REPARSE_POINT`.  We work
around this problem by falling back to `GetFileInformationByHandle()`
if that happens, but only if the reparse point is reported as cloud
reparse point, and only if PHP is running on Windows 1903 or later.

The patch has been developed in collaboration with ab@php.net.

We should keep an eye on the somewhat quirky OneDrive behavior, since
it might change again in a future Windows release.

5 years agoSuppress deprecation warning on IDNA2003 ICU methods
Sara Golemon [Fri, 16 Aug 2019 16:40:20 +0000 (12:40 -0400)]
Suppress deprecation warning on IDNA2003 ICU methods

5 years agoFixed bug #78412
Nikita Popov [Wed, 14 Aug 2019 15:48:57 +0000 (17:48 +0200)]
Fixed bug #78412

$this should only be included in the generator GC buffer, if it
will be released on destruction.

5 years agoBump for 7.2.23
Sara Golemon [Tue, 13 Aug 2019 23:32:12 +0000 (19:32 -0400)]
Bump for 7.2.23

5 years agoFixed bug #77191
Nikita Popov [Tue, 13 Aug 2019 09:19:58 +0000 (11:19 +0200)]
Fixed bug #77191

5 years agoDon't destroy properties array with unset GC type
Nikita Popov [Tue, 13 Aug 2019 07:51:29 +0000 (09:51 +0200)]
Don't destroy properties array with unset GC type

As the properties array can also be a GC root, it might have
already been destroyed.

5 years agoIntern alias old_name early
Nikita Popov [Mon, 12 Aug 2019 14:58:52 +0000 (16:58 +0200)]
Intern alias old_name early

This is likely going to end up interned lateron at some point
when the new_name is referenced somewhere. However, it may be
that there are some uses that do not get interned before that.
In this case we will intern a string that already have zval
users, without updating the refcounted flag on those zvals.

In particular this can happen with something like [Foo::class],
where Foo is an imported symbol. The string it resolves to won't
get interned right away, but may be interned later.

    use Foo as Bar;
    $x = [Bar::class];
    var_dump(Bar::X);
    debug_zval_dump($x); // Will show negative refcount
    class Foo {
        const X = 1;
    }

However, this doesn't really fix the root cause, there are probably
other situations where something similar can occur.

5 years agoFixed handling of references in nested data of objects with destructor
Dmitry Stogov [Fri, 9 Aug 2019 14:43:50 +0000 (17:43 +0300)]
Fixed handling of references in nested data of objects with destructor

5 years agoFixed second part of the bug #78379 (Cast to object confuses GC, causes crash)
Dmitry Stogov [Fri, 9 Aug 2019 12:42:39 +0000 (15:42 +0300)]
Fixed second part of the bug #78379 (Cast to object confuses GC, causes crash)

5 years agoAdded asserts to catch GC errors when refcount goes below zero.
Dmitry Stogov [Fri, 9 Aug 2019 10:37:23 +0000 (13:37 +0300)]
Added asserts to catch GC errors when refcount goes below zero.

5 years agoSkip test when SIGKILL is not defined
Matteo Beccati [Fri, 9 Aug 2019 08:32:15 +0000 (10:32 +0200)]
Skip test when SIGKILL is not defined

5 years agoFixed bug #78379 (Cast to object confuses GC, causes crash)
Dmitry Stogov [Thu, 8 Aug 2019 07:00:39 +0000 (10:00 +0300)]
Fixed bug #78379 (Cast to object confuses GC, causes crash)

5 years agoFix #78282: atime and mtime mismatch
Christoph M. Becker [Sat, 13 Jul 2019 07:40:50 +0000 (09:40 +0200)]
Fix #78282: atime and mtime mismatch

The fix for bug #78241 assumed that `time_t` would always be 64bit, but
actually is 32bit for x86.  We therefore enforce 64bit arithmetic to
avoid wrapping.

(cherry picked from commit bf242d58e77d50d4d8fdaaaca7ede686ec4467c0)

5 years agoFix #78179: MariaDB server version incorrectly detected
Christoph M. Becker [Fri, 2 Aug 2019 14:42:49 +0000 (16:42 +0200)]
Fix #78179: MariaDB server version incorrectly detected

As of MariaDB 10.0.2, the server reports a fake version number as work-
around for replication issues[1].  We apply the same "fix" as in the
MariaDB client to cater to this.

[1] <https://github.com/MariaDB/server/commit/c50ee6c23dbeb090963580754bec2f0a96ac0557#diff-5b45fa673c88c06a9651c7906364f592>

5 years agoFixed bug #78363
Nikita Popov [Fri, 2 Aug 2019 08:35:24 +0000 (10:35 +0200)]
Fixed bug #78363

5 years agoset version for release php-7.1.31
Joe Watkins [Wed, 31 Jul 2019 06:21:39 +0000 (08:21 +0200)]
set version for release

5 years agoadd security NEW entries + reorder [ci skip]
Remi Collet [Tue, 30 Jul 2019 07:26:50 +0000 (09:26 +0200)]
add security NEW entries + reorder [ci skip]

5 years agoMerge branch 'PHP-7.1' into PHP-7.2
Stanislav Malyshev [Mon, 29 Jul 2019 20:19:16 +0000 (13:19 -0700)]
Merge branch 'PHP-7.1' into PHP-7.2

* PHP-7.1:
  Fix #77919: Potential UAF in Phar RSHUTDOWN
  Update NEWS
  Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
  Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)

5 years agoFix #77919: Potential UAF in Phar RSHUTDOWN
Christoph M. Becker [Mon, 29 Jul 2019 14:08:03 +0000 (16:08 +0200)]
Fix #77919: Potential UAF in Phar RSHUTDOWN

We have to properly clean up in case phar_flush() is failing.

We also make the expectation of the respective test case less liberal
to avoid missing such bugs in the future.

5 years agoUpdate NEWS
Stanislav Malyshev [Mon, 29 Jul 2019 07:55:18 +0000 (00:55 -0700)]
Update NEWS

5 years agoFix bug #78326
Albert Casademont [Tue, 23 Jul 2019 12:03:06 +0000 (14:03 +0200)]
Fix bug #78326

Similar to what fread() does, truncate the stream_get_contents()
result if the original buffer was way too large.

5 years agoFix Zend signals unblocking
Nikita Popov [Tue, 23 Jul 2019 08:38:23 +0000 (10:38 +0200)]
Fix Zend signals unblocking

There are a few parts here:
 * opcache should not be blocking signals while invoking compile_file,
   otherwise signals may remain blocked on a compile error. While at
   it, also protect SHM memory during compile_file.
 * We should deactivate Zend signals at the end of the request, to make
   sure that we gracefully recover from a missing unblock and signals
   don't remain blocked forever.
 * We don't use a critical section in deactivation, because it should
   not be necessary. Additionally we want to clean up the signal queue,
   if it is non-empty.
 * Enable SIGG(check) in debug builds so we notice issues in the future.

5 years agoFixed bug #78333
Nikita Popov [Mon, 29 Jul 2019 09:23:26 +0000 (11:23 +0200)]
Fixed bug #78333

Don't dereference float/double values at unknown address, instead
memcpy it into an aligned stack slot and dereference that.

5 years agoFix bug #78256 (heap-buffer-overflow on exif_process_user_comment)
Stanislav Malyshev [Mon, 8 Jul 2019 00:39:59 +0000 (17:39 -0700)]
Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment)

5 years agoFix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
Stanislav Malyshev [Mon, 8 Jul 2019 00:01:01 +0000 (17:01 -0700)]
Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)

5 years agoFix #78342: Bus error in configure test for iconv //IGNORE
Christoph M. Becker [Mon, 29 Jul 2019 06:48:13 +0000 (08:48 +0200)]
Fix #78342: Bus error in configure test for iconv //IGNORE

We have to check the return value of iconv_open() for error, to avoid
that and potentially other undesired behavior of iconv().

5 years agoRemove .post files only for passing tests
Levi Morrison [Thu, 25 Jul 2019 15:48:29 +0000 (09:48 -0600)]
Remove .post files only for passing tests

This allows the sh script for failing tests with --POST-- to work

5 years agoUpdate NEWS
Peter Kokot [Tue, 23 Jul 2019 00:13:00 +0000 (02:13 +0200)]
Update NEWS

5 years agoChecked in LiteSpeed SAPI 7.5, addressed two main problems in "clean shutdown" introd...
George Wang [Sun, 21 Jul 2019 03:59:43 +0000 (23:59 -0400)]
Checked in LiteSpeed SAPI 7.5, addressed two main problems in "clean shutdown" introduced in 7.4.3,
1. falls in an infinite loop because PHP engine's inconsistent state, now override the ITIMER_PROF to 0.1 second, clean shutdown must finish before that.
2. generate too much error log, we completely disable "error_reporting" before calling php_request_shutdown().

5 years agoFixed bug #77946
Abyr Valg [Wed, 17 Jul 2019 18:46:40 +0000 (21:46 +0300)]
Fixed bug #77946

Save multi_info_read() result into easy handle.

5 years agoFixed bug #69100
Nikita Popov [Wed, 17 Jul 2019 13:58:29 +0000 (15:58 +0200)]
Fixed bug #69100

5 years agomove NEWS entry [ci skip]
Remi Collet [Tue, 16 Jul 2019 11:00:13 +0000 (13:00 +0200)]
move NEWS entry [ci skip]

5 years agoFixed bug #78297
Nikita Popov [Tue, 16 Jul 2019 09:08:27 +0000 (11:08 +0200)]
Fixed bug #78297

5 years agonext is 7.2.22
Remi Collet [Tue, 16 Jul 2019 08:38:20 +0000 (10:38 +0200)]
next is 7.2.22

5 years agoFixed incorrect specialization (missed IS_INDIRECT handling)
Dmitry Stogov [Mon, 15 Jul 2019 22:50:10 +0000 (01:50 +0300)]
Fixed incorrect specialization (missed IS_INDIRECT handling)

5 years agoFix bug #77124
Nikita Popov [Tue, 25 Jun 2019 10:09:47 +0000 (12:09 +0200)]
Fix bug #77124

This is a backport of 6fcae63f614d1ed4aaeaff7b13a7a4627b1f1312
to PHP 7.2.

5 years agoFix #78269 password_hash uses weak options for argon2
Remi Collet [Mon, 15 Jul 2019 12:10:38 +0000 (14:10 +0200)]
Fix #78269 password_hash uses weak options for argon2

5 years agoFix bug #78291 Missing opcache directives
Andrew Collington [Sun, 14 Jul 2019 13:49:38 +0000 (14:49 +0100)]
Fix bug #78291 Missing opcache directives

New opcache directives have been added recently which are returned
if using `ini_get_all('zend opcache')` but are not listed in the
directives if using `opcache_get_configuration()`.  This fix adds
those missing directives as well as if `opcache.mmap_base` is used
instead of `opcache.lockfile_path`.  Also adds a test to ensure the
directives match with both methods of fetching.

5 years agoUse TRY_ADDREF/TRY_DELREF in soap
Nikita Popov [Fri, 12 Jul 2019 14:50:43 +0000 (16:50 +0200)]
Use TRY_ADDREF/TRY_DELREF in soap

The DELREF part is a possible fix for bug #78278, the ADDREF part
is a drive-by fix.

5 years agoFixed bug #78279
Nikita Popov [Fri, 12 Jul 2019 14:29:18 +0000 (16:29 +0200)]
Fixed bug #78279

Even if we don't initialize the callback on every request, we
should still reset our globals to default values...

5 years agoRevert "Fixed bug #76980"
Nikita Popov [Tue, 9 Jul 2019 09:04:05 +0000 (11:04 +0200)]
Revert "Fixed bug #76980"

This reverts commit 35353dc49a73a58c17c7896c4c4c3997ef2c007d.

This changes causes issues for Symfony, see
https://github.com/symfony/symfony/issues/32395. I'm reverting it
from PHP 7.2 and PHP 7.3 and only leaving it in PHP 7.4.

5 years agoMerge branch 'PHP-7.1' into PHP-7.2
Christoph M. Becker [Tue, 9 Jul 2019 08:01:52 +0000 (10:01 +0200)]
Merge branch 'PHP-7.1' into PHP-7.2

* PHP-7.1:
  Upgrade to SQLite 3.28.0

5 years agoUpgrade to SQLite 3.28.0
Christoph M. Becker [Fri, 21 Jun 2019 13:48:50 +0000 (15:48 +0200)]
Upgrade to SQLite 3.28.0

Over the years, multiple security vulnerabilities[1] have been found
and fixed in SQLite3, so it makes sense to update our bundled libsqlite
to the latest available version.

[1] <https://www.cvedetails.com/vulnerability-list/vendor_id-9237/Sqlite.html>

5 years agoUpdate NEWS [ci skip]
Peter Kokot [Mon, 8 Jul 2019 16:45:36 +0000 (18:45 +0200)]
Update NEWS [ci skip]

5 years agoBackport fe_reset_rw case
Nikita Popov [Fri, 5 Jul 2019 10:06:52 +0000 (12:06 +0200)]
Backport fe_reset_rw case

5 years agoFix inference for compound object op on dim
Nikita Popov [Fri, 5 Jul 2019 09:39:42 +0000 (11:39 +0200)]
Fix inference for compound object op on dim

5 years agoUpdated to LiteSpeed SAPI V7.4.3
George Wang [Thu, 4 Jul 2019 16:03:21 +0000 (12:03 -0400)]
Updated to LiteSpeed SAPI V7.4.3
Increased response header count limit from 100 to 1000.
Added crash handler to cleanly shutdown PHP request.
Added CloudLinux mod_lsapi mode
Fixed bug #76058

5 years agoFixed bug #78231
Nikita Popov [Wed, 3 Jul 2019 10:27:13 +0000 (12:27 +0200)]
Fixed bug #78231

5 years agoFix #78241: touch() does not handle dates after 2038 in PHP 64-bit
Christoph M. Becker [Wed, 3 Jul 2019 07:59:17 +0000 (09:59 +0200)]
Fix #78241: touch() does not handle dates after 2038 in PHP 64-bit

`time_t` defaults to `_time64` (which is 64bit signed) even on x86, but
`Int32x32To64()` truncates it to signed 32bit.  We replace the macro
with the "manual" calculation.

5 years agoBackport test fix
Nikita Popov [Tue, 2 Jul 2019 14:10:56 +0000 (16:10 +0200)]
Backport test fix

Closes GH-3816.

5 years agoFix bug #78138: opcache.validate_permission incorrectly works with PHAR files
Alex Scott [Tue, 11 Jun 2019 14:31:07 +0000 (18:31 +0400)]
Fix bug #78138: opcache.validate_permission incorrectly works with PHAR files

opcache incorrectly handles PHAR files when opcache.validate_permission
option enabled, because it calls

  access("phar://path-to/file.phar/path/inside.php", R_OK);

rather than

  access("path-to/file.phar", R_OK)

5 years agoAdd missing SKIPIFs
Christoph M. Becker [Mon, 1 Jul 2019 16:11:13 +0000 (18:11 +0200)]
Add missing SKIPIFs

All these tests are meant to run with OPcache available, and some will
even fail inevitably without it, so we add OPcache as SKIPIF
requirement.

5 years agoAdd missing SKIPIFs
Christoph M. Becker [Mon, 1 Jul 2019 13:01:24 +0000 (15:01 +0200)]
Add missing SKIPIFs

All these tests are meant to run with OPcache available, and some will
even fail inevitably without it, so we add OPcache as SKIPIF
requirement.

5 years agoFix brittle test
Christoph M. Becker [Mon, 1 Jul 2019 14:41:20 +0000 (16:41 +0200)]
Fix brittle test

This test is easily tripped by former test runs with other PHP
versions.  To avoid such false positives, we check that there is at
least one respective OPcache file, and that all found OPcache user ID
folders have exactly 32 hexadecimal digits.

5 years agoUpdate NEWS [ci skip]
Anatol Belski [Sat, 29 Jun 2019 15:39:45 +0000 (17:39 +0200)]
Update NEWS [ci skip]

5 years agoFix #78183: finfo_file shows wrong mime-type for .tga file
Joshua Westerheide [Fri, 28 Jun 2019 13:07:14 +0000 (15:07 +0200)]
Fix #78183: finfo_file shows wrong mime-type for .tga file

Due to a bug in the underlying libmagic 5.31, .tga images returned mime type "image/x-tgaimage/x-tga".

5 years agoFix bugs in AST printer
sunnyeo [Fri, 28 Jun 2019 14:06:01 +0000 (16:06 +0200)]
Fix bugs in AST printer

Closes GH-4324.

5 years agoFix bug #78192 PDO SQLite SegFault when reuse statement after schema has changed
Vincent [Wed, 26 Jun 2019 09:37:08 +0000 (11:37 +0200)]
Fix bug #78192 PDO SQLite SegFault when reuse statement after schema has changed

Reset stmt->columns when column count changed on new execution of prepared statement

5 years agoRemove stream_socket_sendto.phpt
Nikita Popov [Wed, 26 Jun 2019 14:58:37 +0000 (16:58 +0200)]
Remove stream_socket_sendto.phpt

Fails for me locally due to different number of warnings with
different messages. Rather than adding more wildcards I'm dropping
this test entirely, as it doesn't seem to test anything particularly
useful.

(cherry picked from commit 84333cad674890174c47f3c21b1b1cf85a4276ac)

5 years agoFix #78202: Opcache stats for cache hits are capped at 32bit NUM
Christoph M. Becker [Tue, 25 Jun 2019 07:56:33 +0000 (09:56 +0200)]
Fix #78202: Opcache stats for cache hits are capped at 32bit NUM

We use the proper format specifiers now.

5 years agoAdd explicit cast to uint32_t.
Andrey Hristov [Fri, 21 Jun 2019 13:30:25 +0000 (16:30 +0300)]
Add explicit cast to uint32_t.

It works even without it but explicit stuff is better. The compiler probably converts the 16-bit
uint16_t to uint32_t before doing the shift.

5 years agoFix PKCS12 leak in openssl
Nikita Popov [Fri, 21 Jun 2019 13:00:25 +0000 (15:00 +0200)]
Fix PKCS12 leak in openssl

5 years agoFix d leak in ecc openssl_pkey_new
Nikita Popov [Fri, 21 Jun 2019 12:43:15 +0000 (14:43 +0200)]
Fix d leak in ecc openssl_pkey_new

5 years agoFix netscape spki leak in openssl
Nikita Popov [Fri, 21 Jun 2019 12:35:35 +0000 (14:35 +0200)]
Fix netscape spki leak in openssl

5 years agoFix X509 leak in openssl_pkcs7_verify()
Nikita Popov [Fri, 21 Jun 2019 12:24:00 +0000 (14:24 +0200)]
Fix X509 leak in openssl_pkcs7_verify()

5 years agoFix CSR leaks in openssl
Nikita Popov [Fri, 21 Jun 2019 12:17:05 +0000 (14:17 +0200)]
Fix CSR leaks in openssl

5 years agoFree cert in php_openssl_load_stream_cafile()
Nikita Popov [Fri, 21 Jun 2019 12:03:06 +0000 (14:03 +0200)]
Free cert in php_openssl_load_stream_cafile()

X509_STORE_add_cert() increments the refcount of the cert, so we
should free it here.

5 years agoFix memory leak in TLS matches_san_list
Niklas Keller [Fri, 3 Aug 2018 19:00:14 +0000 (21:00 +0200)]
Fix memory leak in TLS matches_san_list

5 years agoFix #78189: file cache strips last character of uname hash
Christoph M. Becker [Thu, 20 Jun 2019 15:53:10 +0000 (17:53 +0200)]
Fix #78189: file cache strips last character of uname hash

We must not forget to increase `len` by one to cater to the directory
separator.

5 years agofix test for Windows and for parallel run
Remi Collet [Thu, 20 Jun 2019 09:58:32 +0000 (11:58 +0200)]
fix test for Windows and for parallel run

5 years agoimprove test clean section
Remi Collet [Thu, 20 Jun 2019 09:51:18 +0000 (11:51 +0200)]
improve test clean section

5 years agomove NEWS entry
Remi Collet [Thu, 20 Jun 2019 08:40:52 +0000 (10:40 +0200)]
move NEWS entry