Commit Graph

49793 Commits

Author SHA1 Message Date
Remi Collet
a7ff3a6483 Fix #78269 password_hash uses weak options for argon2 2019-07-15 14:11:30 +02:00
Remi Collet
eab0079c90 Fix #78269 password_hash uses weak options for argon2 2019-07-15 14:10:38 +02:00
Nikita Popov
3eb057c4a7 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-15 10:23:51 +02:00
Andrew Collington
768ad70f70 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.
2019-07-15 10:22:47 +02:00
Nikita Popov
3f73916f10 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-12 16:51:47 +02:00
Nikita Popov
a7de2af46c 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.
2019-07-12 16:50:43 +02:00
Nikita Popov
9d141f9889 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-12 16:30:33 +02:00
Nikita Popov
4a91f66b8f Fixed bug #78279
Even if we don't initialize the callback on every request, we
should still reset our globals to default values...
2019-07-12 16:29:18 +02:00
Nikita Popov
e7a83ec8df Fix bug #78271
When cleaning nops in the dfa pass, we were always keeping the
smart branch inhibiting nop that occurs directly before the jump
instruction. However, as we skip unreachable blocks entirely, it
may happen that we need to keep a nop that occurs further back,
prior to the unreachable blocks. Account for that case now.

We should really do something about the smart branch situation,
this is very fragile...
2019-07-10 17:25:40 +02:00
Christoph M. Becker
7404d756e9 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Upgrade to SQLite 3.28.0
2019-07-09 10:04:41 +02:00
Christoph M. Becker
40f7533cc1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Upgrade to SQLite 3.28.0
2019-07-09 10:02:47 +02:00
Christoph M. Becker
e944ae6b2a 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>
2019-07-09 09:59:46 +02:00
Nikita Popov
e3c701ea38 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-05 12:07:10 +02:00
Nikita Popov
5846e85283 Backport fe_reset_rw case 2019-07-05 12:06:52 +02:00
Nikita Popov
920283ff2b Merge branch 'PHP-7.2' into PHP-7.3 2019-07-05 11:40:45 +02:00
Nikita Popov
c353f17d42 Fix inference for compound object op on dim 2019-07-05 11:39:42 +02:00
Nikita Popov
af3c854074 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-03 12:36:50 +02:00
Nikita Popov
0e48e35e04 Fixed bug #78231 2019-07-03 12:36:06 +02:00
Nikita Popov
4892bbc167 Fixed bug #78230 2019-07-03 10:20:07 +02:00
Christoph M. Becker
5e5b7cb4d4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78241: touch() does not handle dates after 2038 in PHP 64-bit
2019-07-03 10:02:22 +02:00
Christoph M. Becker
44c8b7414c 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.
2019-07-03 09:59:17 +02:00
Nikita Popov
7174c44557 Merge branch 'PHP-7.2' into PHP-7.3 2019-07-02 12:28:37 +02:00
Alex Scott
a4acff3e21 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)
2019-07-02 12:25:50 +02:00
Christoph M. Becker
3e25ddb07b Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add missing SKIPIFs
2019-07-01 18:12:28 +02:00
Christoph M. Becker
57688ad7bf 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.
2019-07-01 18:11:13 +02:00
Christoph M. Becker
99e6c701e6 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add missing SKIPIFs
2019-07-01 17:22:55 +02:00
Christoph M. Becker
75bc3446f8 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.
2019-07-01 17:21:16 +02:00
Christoph M. Becker
d714be0f57 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix brittle test
2019-07-01 16:43:47 +02:00
Christoph M. Becker
be559e6c37 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.
2019-07-01 16:42:55 +02:00
Peter Kokot
624488b5e8 Fix bug #78197: PCRE2 version check
When external PCRE library version is of format ##.##-RC# the check
failed.
2019-07-01 02:42:29 +02:00
Derick Rethans
cc3fe3bd30 Fixed tests due to changed timezone data 2019-06-30 15:50:38 +01:00
Derick Rethans
aae5907cb7 Update timelib to 2018.02 2019-06-30 15:45:13 +01:00
Anatol Belski
b926690947 Fix typo 2019-06-29 13:30:35 +02:00
Joshua Westerheide
6cdeedb8de Add tests from fix #78183 from PHP-7.2 2019-06-29 13:29:53 +02:00
Joshua Westerheide
855bbc88c9 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".
2019-06-29 13:24:52 +02:00
Christoph M. Becker
646debaf38 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #78192 PDO SQLite SegFault when reuse statement after schema has changed
2019-06-28 12:36:55 +02:00
Vincent
05c00a832c 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
2019-06-28 12:36:02 +02:00
Christoph M. Becker
801ab18ea7 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Remove stream_socket_sendto.phpt
2019-06-26 17:01:29 +02:00
Nikita Popov
7d28a24c66 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 84333cad67)
2019-06-26 16:58:37 +02:00
Christoph M. Becker
18bba63f39 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78202: Opcache stats for cache hits are capped at 32bit NUM
2019-06-25 13:04:28 +02:00
Christoph M. Becker
4366f22dfc Fix #78202: Opcache stats for cache hits are capped at 32bit NUM
We use the proper format specifiers now.
2019-06-25 13:00:28 +02:00
Andrey Hristov
8326f95fe3 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-21 16:32:13 +03:00
Andrey Hristov
102c64e827 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.
2019-06-21 16:31:56 +03:00
Nikita Popov
66e4b78519 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-21 15:07:59 +02:00
Nikita Popov
99f3e0f0ed Fix PKCS12 leak in openssl 2019-06-21 15:07:37 +02:00
Nikita Popov
c939a67866 Fix d leak in ecc openssl_pkey_new 2019-06-21 15:07:32 +02:00
Nikita Popov
dfe6f0c1c6 Fix netscape spki leak in openssl 2019-06-21 15:07:26 +02:00
Nikita Popov
a0da2fb2b7 Fix X509 leak in openssl_pkcs7_verify() 2019-06-21 15:07:18 +02:00
Nikita Popov
e0bafc6da4 Fix CSR leaks in openssl 2019-06-21 15:07:10 +02:00
Nikita Popov
90cb3743be Free cert in php_openssl_load_stream_cafile()
X509_STORE_add_cert() increments the refcount of the cert, so we
should free it here.
2019-06-21 15:07:00 +02:00
Nikita Popov
414db07bdb Merge branch 'PHP-7.2' into PHP-7.3 2019-06-21 12:55:12 +02:00
Niklas Keller
fea9f93166 Fix memory leak in TLS matches_san_list 2019-06-21 12:54:30 +02:00
Christoph M. Becker
a85254b898 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78189: file cache strips last character of uname hash
2019-06-20 17:59:59 +02:00
Christoph M. Becker
fcd6f2de60 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.
2019-06-20 17:58:32 +02:00
Remi Collet
676b564f43 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  fix test for Windows and for parallel run
2019-06-20 11:58:49 +02:00
Remi Collet
d8202bf917 fix test for Windows and for parallel run 2019-06-20 11:58:32 +02:00
Remi Collet
d7597f73cc Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  improve test clean section
2019-06-20 11:51:51 +02:00
Remi Collet
b3cfeda3c7 improve test clean section 2019-06-20 11:51:18 +02:00
Remi Collet
a197dc72c3 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  add test for #78185
2019-06-20 10:28:00 +02:00
Remi Collet
63f2d88088 add test for #78185 2019-06-20 10:27:33 +02:00
Dmitry Stogov
35acda856a Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78185 (File cache no longer works)
2019-06-20 09:05:50 +03:00
Dmitry Stogov
cd6a6e4cf2 Fixed bug #78185 (File cache no longer works) 2019-06-20 09:04:14 +03:00
Andrey Hristov
7ba1e6b34d Merge branch 'PHP-7.2' into PHP-7.3 2019-06-19 16:43:06 +03:00
Andrey Hristov
82021ad9df Fix version comparison 2019-06-19 16:42:43 +03:00
Joe Watkins
a5db319463
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  fix setcookie Max-Age to use php_time
2019-06-19 12:42:25 +02:00
Joe Watkins
31a1c1e67c
fix setcookie Max-Age to use php_time 2019-06-19 12:42:00 +02:00
Joe Watkins
264536877d
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  export php_time
2019-06-19 12:40:23 +02:00
Joe Watkins
599b94ff14
export php_time 2019-06-19 12:39:51 +02:00
Joe Watkins
025899e3b5
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Resolve discrepencies between second value yielded by gettimeofday and time, fixes #69044
2019-06-19 08:59:04 +02:00
Joe Watkins
65067dff01
Resolve discrepencies between second value yielded by gettimeofday and time, fixes #69044 2019-06-19 08:56:20 +02:00
Asher Baker
d54220bc79 Fix #78173: XML-RPC mutates immutable objects during encoding
With opcache.protect_memory=1 enabled, the XML-RPC extension causes a
segfault on PHP 7.2 as it is modifying the recursion counter of objects
it touches, without first checking if they are immutable or not.

This doesn't affect 7.3+
2019-06-18 17:08:11 +02:00
Nikita Popov
11b354dd54 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-17 13:30:56 +02:00
Nikita Popov
03db04c3ab Accept null for preg_quote delimiter argument
Related to bug #78163.
2019-06-17 13:30:15 +02:00
Dmitry Stogov
96a6f7f7f5 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Backport 96a12578c1
2019-06-14 13:29:30 +03:00
Dmitry Stogov
28808ca96d Backport 96a12578c1 2019-06-14 13:29:13 +03:00
Dmitry Stogov
a5b39abd86 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Backport 91a6cdbff5
2019-06-14 13:25:06 +03:00
Dmitry Stogov
40f463b560 Backport 91a6cdbff5 2019-06-14 13:24:47 +03:00
Nikita Popov
98457b6d60 Fix some leaks in ldap
The result of zval_get_string() needs to be released. In some places
where it is inconvenient to manage, I went back to convert_to_string.
It is safe in those places due to existing array separations.

Also fix a preexisting leak when getting controls, the previous
value was not destroyed.
2019-06-14 11:11:24 +02:00
Côme Chilliet
5d2fe48785 Some more string conversion handling, fixing bug #77958 2019-06-13 22:12:34 +02:00
Côme Chilliet
c219d8d5c2 Avoid converting zval when not needed
Also added exception checks so that exception from __toString are
 correctly handled in the future
2019-06-13 20:58:45 +02:00
Nikita Popov
bada2049ca Merge branch 'PHP-7.2' into PHP-7.3 2019-06-13 12:52:32 +02:00
Nikita Popov
f1a8138055 Fixed bug #78106
When disabling opcache during the request via opcache.enable ini
setting, make sure we also disable ZCG(accelerator_enabled).
2019-06-13 12:51:35 +02:00
Nikita Popov
ee137a7033 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-13 12:38:57 +02:00
Nikita Popov
f8a68fd935 Add test for bug #78106
Also add PHP_TEST_EXTRA_ARGS environment variable, which allows
to pass on -c, -d etc flags provided by run-tests.php. Otherwise
we won't get the built-in server to run with opcache.
2019-06-13 12:35:29 +02:00
Tyson Andre
5d3e3a62a2 Be more precise about possible types for mysqli methods
mysqli has an uncommon approach to 64-bit compatibility:
it will convert numbers that can't be represented on 32-bit
platforms to a string.
This is documented at
https://www.php.net/manual/en/mysqli-stmt.affected-rows.php#refsect1-mysqli-stmt.affected-rows-returnvalues

So if there's a query to a remote mysqli server that affects
more than 2.2 billion rows, then the opcache inference might be
incorrect.

(It's possible to add a MAY_BE_STRING_ON_32_BIT_PLATFORM bitflag macro to
account for this, but I don't think there's a need or want to?)

Patches 3162285b86

This is based on the list of php 7.4 functions using
MYSQLI_RETURN_LONG_INT in mysqli_api.c
2019-06-11 15:40:33 +02:00
Tyson Andre
07c63c6fdf Fix opcache signatures for mysqli_stat
See mysqli_api.c and https://www.php.net/manual/en/mysqli.stat.php
2019-06-11 15:39:59 +02:00
Tyson Andre
7350e808c5 Fix bug in opcache flags for mysqli_get_charset
https://www.php.net/manual/en/mysqli.get-charset.php
tests/mysqli_field_seek.phpt has a test of this returning an object.

Looking at the source in ext/mysqli/mysqli_nonapi.c,
this should be object|null, not array|null

This might actually cause bugs in opcache's inferences,
(no proof of this)
so it might make sense to pull this patch into an earlier minor version.
2019-06-11 15:39:59 +02:00
Christoph M. Becker
b215d1339f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77937: preg_match failed
2019-06-11 08:44:07 +02:00
Christoph M. Becker
f3ff72e54b Fix #77937: preg_match failed
On some recent Windows systems, ext\pcre\tests\locales.phpt fails,
because 'pt_PT' is accepted by `setlocale()`, but not properly
supported by the ctype functions, which are used internally by PCRE2 to
build the localized character tables.

Since there appears to be no way to properly check whether a given
locale is fully supported, but we want to minimize BC impact, we filter
out typical Unix locale names, except for a few cases which have
already been properly supported on Windows.  This way code like

  setlocale(LC_ALL, 'de_DE.UTF-8', 'de_DE', 'German_Germany.1252');

should work like on older Windows systems.

It should be noted that the locale names causing trouble are not (yet)
documented as valid names anyway, see
<https://docs.microsoft.com/en-us/cpp/c-runtime-library/locale-names-languages-and-country-region-strings?view=vs-2019>.
2019-06-11 08:42:32 +02:00
Dmitry Stogov
a0749fe483 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed possible misalignment in 32-bit build.
2019-06-10 12:52:50 +03:00
Dmitry Stogov
199eb2b110 Fixed possible misalignment in 32-bit build. 2019-06-10 12:51:59 +03:00
Nikita Popov
9569a0b8ca Merge branch 'PHP-7.2' into PHP-7.3 2019-06-07 10:57:43 +02:00
Nikita Popov
d7c7522be9 Enable STRICT_TRANS_TABLES in new test
The part testing error cases relies on this.
2019-06-07 10:57:09 +02:00
Dmitry Stogov
972223c342 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #77135 (Extract with EXTR_SKIP should skip $this)
2019-06-07 11:48:57 +03:00
Dmitry Stogov
83cdb89f8a Fixed bug #77135 (Extract with EXTR_SKIP should skip $this) 2019-06-07 11:36:39 +03:00
Nikita Popov
a5f98139c9 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-07 09:49:01 +02:00
Cameron Porter
7d1aa7534d Fixed bug #38546
Properly support binding boolean parameters with emulated prepared
statements disabled. Also add the necessary mysqlnd support for
MYSQL_TYPE_TINY.
2019-06-07 09:48:43 +02:00
Christoph M. Becker
5f2f6180b9 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix test regarding Unix Domain Sockets on Windows
2019-06-06 15:00:35 +02:00
Christoph M. Becker
2df32942d3 Fix test regarding Unix Domain Sockets on Windows
Recent Windows versions actually support Unix Domain Sockets.  Cf.
<https://github.com/curl/curl/pull/3939>.
2019-06-06 14:59:58 +02:00
Christoph M. Becker
22a3fa0b2e Fix #78114: segfault when calling sodium_* functions from eval
We must not follow the NULL pointer.
2019-06-06 10:00:15 +02:00
Joe Watkins
249c20023d
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  fix flaky posix test
2019-06-05 16:35:43 +02:00
Joe Watkins
f4474e5724
fix flaky posix test 2019-06-05 16:34:50 +02:00
Nikita Popov
37bba7a678 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-03 15:15:07 +02:00
Nikita Popov
ac60007bec Clear errors after SSL_CTX_load_verify_locations()
We report our own errors here. Make sure these don't clog up the
error queue.
2019-06-03 15:14:01 +02:00
Jakub Zelenka
8f69ca8dcd Merge branch 'PHP-7.2' into PHP-7.3 2019-06-02 19:13:18 +01:00
Jakub Zelenka
2e02579474 Fix bug #78079 (openssl_encrypt_ccm.phpt fails with OpenSSL 1.1.1c)
It also fixes invalid setting of tag length
2019-06-02 19:10:56 +01:00
Anatol Belski
793fd6bce9 Fix expect section 2019-06-01 14:50:14 +02:00
Anatol Belski
2205546edf Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Change ZPP only if compiled with ICU >= 64
  Update tests for ICU 64
2019-06-01 02:26:07 +02:00
Anatol Belski
ee153deb1f Change ZPP only if compiled with ICU >= 64 2019-06-01 02:18:56 +02:00
Nikita Popov
b01d9fdab1 Update tests for ICU 64
(cherry picked from commit 8a8bc5c452)
2019-06-01 02:17:16 +02:00
Craig Duncan
370997fb5d Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Add a test for bug #65672
  Ensure the internal properties cannot be overwritten
2019-05-30 18:55:55 +01:00
Craig Duncan
8b53c7232e Add a test for bug #65672 2019-05-30 18:55:42 +01:00
Craig Duncan
dc586bff36 Ensure the internal properties cannot be overwritten 2019-05-30 18:55:36 +01:00
Nikita Popov
61a38bb274 SCCP: Fix leak when determining TYPE_CHECK from type info
As TYPE_CHECK is the only opcode where we do something like this,
I'm adding this hack.
2019-05-29 16:47:19 +02:00
Nikita Popov
de7d0256a3 Merge branch 'PHP-7.2' into PHP-7.3 2019-05-29 09:47:43 +02:00
Craig Duncan
5d67271db0 Add tests for DatePeriod properties 2019-05-29 09:47:10 +02:00
Nikita Popov
817b50826e Merge branch 'PHP-7.2' into PHP-7.3 2019-05-28 16:41:08 +02:00
Nikita Popov
59dfaa3f99 Fix type inference of SEND_UNPACK with empty array
An empty array will not be turned into an array of references.
This violated the invariant than an array has values iff it has
keys.
2019-05-28 16:40:56 +02:00
Stanislav Malyshev
9d473f1eac Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #77967 - Bypassing open_basedir restrictions via file uris
2019-05-27 21:36:05 -07:00
Stanislav Malyshev
fbb6a27212 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77967 - Bypassing open_basedir restrictions via file uris
2019-05-27 21:36:00 -07:00
Stanislav Malyshev
c34895e837 Fix bug #77967 - Bypassing open_basedir restrictions via file uris 2019-05-27 18:48:48 -07:00
Stanislav Malyshev
13dffa9d32 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #77988 - heap-buffer-overflow on php_jpg_get16
2019-05-27 17:28:25 -07:00
Stanislav Malyshev
dc1d99e772 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77988 - heap-buffer-overflow on php_jpg_get16
2019-05-27 17:28:20 -07:00
Stanislav Malyshev
73ff4193be Fix bug #77988 - heap-buffer-overflow on php_jpg_get16 2019-05-27 17:28:09 -07:00
Stanislav Malyshev
e63b2ba310 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix function name
2019-05-27 17:21:23 -07:00
Stanislav Malyshev
9bca9ef6cf Fix function name 2019-05-27 17:20:56 -07:00
Stanislav Malyshev
c7eb0feed8 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Update NEWS
  Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow
  Fix #77973: Uninitialized read in gdImageCreateFromXbm
2019-05-27 16:49:25 -07:00
Stanislav Malyshev
e77c8e45ba Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow
  Fix #77973: Uninitialized read in gdImageCreateFromXbm
2019-05-27 16:49:19 -07:00
Stanislav Malyshev
7cf7148a8f Fix bug #78069 - Out-of-bounds read in iconv.c:_php_iconv_mime_decode() due to integer overflow 2019-05-27 16:32:42 -07:00
Christoph M. Becker
ed6dee9a19 Fix #77973: Uninitialized read in gdImageCreateFromXbm
We have to ensure that `sscanf()` does indeed read a hex value here,
and bail out otherwise.
2019-05-27 16:11:32 -07:00
Nikita Popov
0cb43ec51c Merge branch 'PHP-7.2' into PHP-7.3 2019-05-27 17:43:13 +02:00
Michael Maroszek
a0c9d0849a Fixed bug #76345 2019-05-27 17:42:20 +02:00
Nikita Popov
31ce1cbbb9 Func info: Fix calls to zero-arg varargs
The num_args does not include variadics, so a "zero-arg" function
may accept additional arguments through that. No functions seem
to be affected right now, but they will be after #4175.
2019-05-27 16:14:51 +02:00
Jakub Zelenka
209b12e064 Merge branch 'PHP-7.2' into PHP-7.3 2019-05-26 18:49:52 +01:00
Jakub Zelenka
8baf3ffde6 Add fpmi to the opcache supported sapis 2019-05-26 18:47:22 +01:00
Nikita Popov
6f9dfd9473 Fix bug #77955
Free metadata before freeing the arena. I don't have a repro script,
but the added assertion fails for many existing tests prior to this
change.
2019-05-23 13:40:52 +02:00
Nikita Popov
b394654c1e Merge branch 'PHP-7.2' into PHP-7.3 2019-05-23 11:12:59 +02:00
Nikita Popov
9a74b23297 Fixed bug #78038 socket_select with references 2019-05-23 11:12:15 +02:00
Dmitry Stogov
d4867e099e Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed race condition in opcache restart
2019-05-23 00:21:04 +03:00
Dmitry Stogov
fa6a4483e6 Fixed race condition in opcache restart 2019-05-23 00:20:35 +03:00
Dmitry Stogov
aa9c76d027 Fixed dump of constant flags 2019-05-22 22:59:40 +03:00
Nikita Popov
f308aa4e1e Merge branch 'PHP-7.2' into PHP-7.3 2019-05-22 12:45:16 +02:00
Sjon Hortensius
96404eb8e2 Fix #77956 - When mysqli.allow_local_infile = Off, return a client error 2019-05-22 12:44:55 +02:00
Christoph M. Becker
69c634a56d Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix test case for cURL 7.65.0
2019-05-22 12:02:03 +02:00
Christoph M. Becker
62fe6ba20c Fix test case for cURL 7.65.0
Reported and patch provided by @Jan-E.
2019-05-22 12:01:23 +02:00
Nikita Popov
3a719696bc Merge branch 'PHP-7.2' into PHP-7.3 2019-05-22 11:43:26 +02:00
Nikita Popov
3a0de243c3 Use a different URL in bug44811.phpt 2019-05-22 11:41:51 +02:00
Rasmus Lerdorf
2d29263a9f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix precedence issue causing sub-second timeouts to be 0 in curl_multi_select
2019-05-21 14:46:24 -07:00
Rasmus Lerdorf
7b42cdf95e Fix precedence issue causing sub-second timeouts to be 0 in
curl_multi_select
2019-05-21 14:44:11 -07:00
Nikita Popov
97ba6b0d8b Don't evaluate functions with partial array arguments 2019-05-21 17:35:03 +02:00
Nikita Popov
30f1b17262 Fix null check in sccp add_array_elem chain handling
We need to check result_use rather than result_def for a null zval.
Previously we were later assuming that the null zval is really a
partial array, which does not go well.
2019-05-21 17:15:07 +02:00
Nikita Popov
fc4836b193 Fix partial array handling in FE_RESET edge feasibility 2019-05-21 16:59:27 +02:00
Nikita Popov
cd188d0398 Handle partial arrays in zend_is_true() checks 2019-05-21 16:53:34 +02:00
Nikita Popov
bdce5849b7 Extract ct_eval_binary_op()
And use it in more places, though some of them are currently not
reachable by partial arrays to the best of my knowledge.
2019-05-21 16:43:41 +02:00
Nikita Popov
367788cbc3 Improve SCCP debug code
In particular properly dump partial arrays when tracing execution.
2019-05-21 16:42:13 +02:00
Christoph M. Becker
d23bc33dc1 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Prevent test case failure
2019-05-21 11:18:32 +02:00
Christoph M. Becker
e6a191de1b Prevent test case failure
If opcache.log_verbosity_level is greater than 1, opcache will raise
warnings, which will be written to stderr in the default case.  These
warnings are actually to be expected, but would break the test, so we
make sure that the log_verbosity_level is 1 when running this test.
2019-05-21 11:17:51 +02:00
Nikita Popov
4ebd9a5366 Merge branch 'PHP-7.2' into PHP-7.3 2019-05-21 10:04:51 +02:00
Vincent JARDIN
5f8c22d415 Support content_type stream context option in soap
Allows overriding the HTTP header using the HTTP context:

    $client = new SoapClient('http://url.wsdl&v=latest', [
      'stream_context' => stream_context_create([
        'http' => [
          'content_type' => 'foobarX',
        ],
      ]),
    ]);

This is a backport of c55af3c65a
to the PHP 7.2 branch.
2019-05-21 10:04:15 +02:00
Christoph M. Becker
11740abd6b Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  use {TMP} placeholder in phpt tests
2019-05-21 09:03:01 +02:00
Holly Li (WIPRO LIMITED)
202e6936d6 use {TMP} placeholder in phpt tests 2019-05-21 09:02:37 +02:00
Dmitry Stogov
354a76bb80 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Prevent race condition in opcache_reset()
2019-05-21 00:08:03 +03:00
Dmitry Stogov
a8a019d68a Prevent race condition in opcache_reset() 2019-05-21 00:07:17 +03:00
Christoph M. Becker
db8ef71353 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix test wrt. opcache.error_log
2019-05-20 11:10:20 +02:00
Christoph M. Becker
64ec9f4dbe Fix test wrt. opcache.error_log
Since the test expects log messages to be written to stderr, we have to
make sure that opcache.error_log is set correctly when running the
test.
2019-05-20 11:09:44 +02:00
Christoph M. Becker
fd607635a4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78025: segfault when accessing properties of DOMDocumentType
2019-05-17 13:32:13 +02:00
Christoph M. Becker
e246dea9fe Fix #78025: segfault when accessing properties of DOMDocumentType
Instead of following the NULL pointer, we return an empty string.
2019-05-17 13:31:18 +02:00
Nikita Popov
9d76fbd0c4 Fixed bug #78015
Don't try to evaluate various operations with partial array operands.
We could evaluate some of these, but let's be conservative for now...
2019-05-15 14:35:31 +02:00
Dmitry Stogov
a43678aa12 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed possible crashes, because of inconsistent PCRE cache and opcache SHM reset
2019-05-14 14:54:30 +03:00
Dmitry Stogov
5c4d125d4c Fixed possible crashes, because of inconsistent PCRE cache and opcache SHM reset 2019-05-14 14:53:52 +03:00
Christoph M. Becker
69bab6e5a5 Fix #78003: strip_tags output change since PHP 7.3
A refactoring of the strip tags state machine[1] missed the special
treatment of `depth > 0` when a `>` is encountered in state 2 or 3.  We
re-add it for BC reasons.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=5cf64742773ddbf9af69d962a4d12b567fcf0084>
2019-05-13 13:10:24 +02:00
Peter Kokot
43e6fd1e2b Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Convert CRLF to LF
2019-05-13 03:53:31 +02:00
Peter Kokot
f95b27c6f6 Convert CRLF to LF
These files are tracked with CRLF line endings in Git and can be
converted to LF. Neither are parts of tests or code itself.
2019-05-13 03:51:00 +02:00
Peter Kokot
bec22af8d7 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Convert CRLF to LF in *.wsdl files
2019-05-11 17:15:08 +02:00
Peter Kokot
b15bfb9129 Convert CRLF to LF in *.wsdl files
These EOL types are part of different environments and not part of the
tests themselves.
2019-05-11 17:12:28 +02:00
Nikita Popov
90318fbcbe Merge branch 'PHP-7.2' into PHP-7.3 2019-05-09 12:35:11 +02:00
Nikita Popov
35c80583f0 Fixed bug #75186 2019-05-09 12:33:53 +02:00
Christoph M. Becker
e46b3c3e70 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix log_verbosity_bug.phpt
2019-05-09 12:15:32 +02:00
Christoph M. Becker
e359812ce3 Fix log_verbosity_bug.phpt
This test may fail on Windows due to the file cache fallback.  We
ensure that this will not happen.
2019-05-09 12:15:00 +02:00
Peter Kokot
d153fbc5a9 Convert CRLF line endings to LF
This patch simplifies line endings tracked in the Git repository and
syncs them to all include the LF style instead of the CRLF files.

Newline characters:
- LF (\n) (*nix and Mac)
- CRLF (\r\n) (Windows)
- CR (\r) (old Mac, obsolete)

To see which line endings are in the index and in the working copy the
following command can be used:
`git ls-files --eol`

Git additionally provides `.gitattributes` file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).

Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF newlines in all files in the working tree.

Unless CRLF files are tracked specifically, Git by default tracks all
files in the index using LF newlines.
2019-05-07 04:34:37 +02:00
Jakub Zelenka
36a7d9fca4 Merge branch 'PHP-7.2' into PHP-7.3 2019-05-05 21:05:55 +01:00
Jakub Zelenka
9977de0028 Fix OpenSSL online test for ca context
The php.net is redirected to https so use nginx.org
2019-05-05 21:04:28 +01:00
Javier Spagnoletti
6b73e692c9 Add more missing CURL_VERSION_* constants
And also check for CURL_VERSION_* constants in the sync-constants.php
script.

Related to request #72189: Add missing `CURL_VERSION_*` constants.
2019-05-02 15:11:42 +02:00
Stanislav Malyshev
66b32f25d5 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug #77950 - Heap-buffer-overflow in _estrndup via exif_process_IFD_TAG
2019-04-30 00:05:43 -07:00
Stanislav Malyshev
cb5af4e8a0 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #77950 - Heap-buffer-overflow in _estrndup via exif_process_IFD_TAG
2019-04-30 00:05:32 -07:00
Stanislav Malyshev
f80ad18afa Fix bug #77950 - Heap-buffer-overflow in _estrndup via exif_process_IFD_TAG
I do not completely understand what is going on there, but I am pretty
sure dir_entry <= offset_base if not a normal situation, so we better not
to rely on such dir_entry.
2019-04-30 00:05:23 -07:00
Christoph M. Becker
18a9ae412f Fix #77943: imageantialias($image, false); does not work
Firstly, we must not call `gdImageSetAntiAliased()` (which sets the
color to anti-alias), but rather modify the `gdImage.AA` flag.
Furthermore, we have to actually use the supplied boolean value.

We also make sure that we don't attempt to enable anti-aliasing for
palette images.
2019-04-29 17:23:16 +02:00
Christoph M. Becker
3891e0d13a Add tests for bug77943 2019-04-29 16:29:08 +02:00
Christoph M. Becker
3fc1bdc81c Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77943: imageantialias($image, false); does not work
2019-04-29 16:18:27 +02:00
Christoph M. Becker
cd94cf60a2 Fix #77943: imageantialias($image, false); does not work
Firstly, we must not call `gdImageSetAntiAliased()` (which sets the
color to anti-alias), but rather modify the `gdImage.AA` flag.
Furthermore, we have to actually use the supplied boolean value.

We also make sure that we don't attempt to enable anti-aliasing for
palette images.
2019-04-29 16:16:46 +02:00
Nikita Popov
ff2b5bda59 Merge branch 'PHP-7.2' into PHP-7.3 2019-04-29 13:53:45 +02:00
Nikita Popov
5da0579259 Fixed bug #77945
Make sure that we proper distinguish between empty string key and
no key during SDL serialization.
2019-04-29 13:52:18 +02:00
Christoph M. Becker
7faaf5a89a Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix tests
2019-04-29 09:05:04 +02:00
Christoph M. Becker
9bf11045db Fix tests
These tests are obviously meant to test successful and failing uri:
DSNs, but did not pass proper file:// URIs, so actually ended up
testing for invalid data source URIs twice.  We fix this, and adjust
the expectations accordingly.

We also unfork the -win32 variant, since both test cases are almost
identical, and the expected error message may be either one.
2019-04-29 09:04:33 +02:00
Christoph M. Becker
06b130579e Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Make MySQLPDOTest::extractVersion() more liberal
2019-04-28 23:49:19 +02:00
Christoph M. Becker
fc9cdb723b Make MySQLPDOTest::extractVersion() more liberal
MySQL/MariaDB version strings may have suffixes which may contain dots;
for instance, Debian stretch has 5.5.5-10.1.37-MariaDB-0+deb9u1 or
such.  Therefore, we make the version extraction more liberal, and only
require that there are at least three parts separated by dot, and
ignore additional parts.

We also fix an erroneous test expectation, which would be triggered on
CI now, right away.  This patch has been provided by petk@.
2019-04-28 23:48:27 +02:00
Peter Kokot
1bdd97a601 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Update NEWS
  Fix #77024: SplFileObject::__toString() may return array
2019-04-28 00:50:54 +02:00
Craig Duncan
91c6fb881e Fix #77024: SplFileObject::__toString() may return array
- Correct the behaviour of casting spl files to strings
- Add a test for Bug 77024
2019-04-28 00:44:48 +02:00
Christoph M. Becker
e561d4100b Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #77944: Wrong meta pdo_type for bigint on LLP64
2019-04-27 18:47:32 +02:00
Christoph M. Becker
16609880f8 Fix #77944: Wrong meta pdo_type for bigint on LLP64
When actually fetching the data, bigint (unsigned) column values are
returned as integers on LLP64 architectures, so their pdo_type has to
be PDO::PARAM_INT accordingly.
2019-04-27 18:46:27 +02:00